Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMICHAEL P
5,191 PointsNeed Help With Ruby Code Challenge: Inside of the LaserBots module, create a class called Player.
Hi,
I need help with a Ruby Code Challenge: Module. I know how to do the first part, but I don't know how to do the 2nd part. I am stuck! I am hoping that someone can help me with this? Your help would be greatly appreciated:
Create a module called LaserBots.
module LaserBots end
The 2nd part of the challenge is what I don't know how to do:
Inside of the LaserBots module, create a class called Player.
Thank you
1 Answer
Rick Buffington
8,146 PointsOkay, this one they are being very specific - and very relaxed. Based on the challenge and previous video, they are wanting you to know how to create a Class INSIDE of a Module.
module LaserBots
class Player
end
end
And that's it. Module with empty Player class created inside.
Sam Deighton II
25,602 PointsSam Deighton II
25,602 PointsYou need to nest the Player class inside the module. (Replace X and Y, with LaserBots and Player below)
If you look at the Teachers Notes underneath the video there is a Code Sample that is a good example as well.