-
Notifications
You must be signed in to change notification settings - Fork 48
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
Sockets - Amy #26
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
initialize
method run? What does it do?Hash
instead of an instance of a class?SolarSystem
class used aHash
instead of anArray
to store the list of planets?require
statements? Which files neededrequire
s, and which did not? What is the pattern?main.rb
file 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.