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
Unicorn makes riders magical #2
Conversation
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.
Made some notes - also, let's build some tests for these classes :)
end | ||
|
||
def make_magic | ||
@name = "Yer a wizard #{name}" |
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.
When we make a rider magic, should we maintain their non-magic name for use in the non-magic world?
@@ -0,0 +1,23 @@ | |||
class Unicorn | |||
attr_accessor :name |
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.
I think this could be an attr_reader - is there a reason that we are exposing this?
def exclaim_name | ||
p name.upcase | ||
end |
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.
Yes! I love when unicorns can speak!
end | ||
|
||
def add_rider(rider) | ||
@riders<< rider |
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.
Let's put a space here between @riders and <<
end | ||
|
||
def make_riders_magical | ||
riders.length.times do |i| |
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.
Let's use each
here
What does this Pull Request Do
Gif here
Type of Pull Request
Anything in particular you are requesting from reviewer?
PR Checklist