-
Notifications
You must be signed in to change notification settings - Fork 35
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
Queues -Hyunji Kim - solar_system.rb #41
base: master
Are you sure you want to change the base?
Conversation
Solar SystemWhat We're Looking For
Excellent work on the optionals! |
class Planet | ||
attr_accessor :name, :distance_from_the_sun, :radius, :mass, :moons, :density, :gravity, :rate_solar_rotation | ||
|
||
def initialize(planet_hash) |
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.
Good job re-working Planet#initialize
to take a hash.
|
||
def find_planet(planet_name) #solar_system.find_planet(whatever).distance_from_the_sun | ||
i = 0 | ||
@planets.length.times do |
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.
Good work on this bit of logic. It might be a little more clean if you used an each
loop - you wouldn't have to use the [i]
everywhere.
Solar System
Congratulations! You're submitting your assignment.
Comprehension Questions
initialize
method in your class?SolarSystem
used anArray
vs aHash
.