-
Notifications
You must be signed in to change notification settings - Fork 48
Sockets - Amy #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Sockets - Amy #26
Conversation
|
Good job overall - this submission is well-organized and clearly hits the learning goals. Keep up the hard work! |
|
|
||
| solar_system.planets.each_with_index do |planet, index| | ||
| puts "#{planet.name}" | ||
| if planet.name == learn_choice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove debug output (like line 37) before submitting projects.
| def find_planet_by_name(planet_name) | ||
| @planets.each do |planet| | ||
| if planet.name.capitalize == planet_name.capitalize | ||
| return planet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an enumerable method you could use to make this a little cleaner?
Solar System
Congratulations! You're submitting your assignment.
Comprehension Questions
initializemethod run? What does it do?Hashinstead of an instance of a class?SolarSystemclass used aHashinstead of anArrayto store the list of planets?requirestatements? Which files neededrequires, and which did not? What is the pattern?main.rbfile required the planet and solar system files because the data stored in each needed to be accessed by the main file. The solar system and planet files did not reference other sources because the information was self-contained.