-
Notifications
You must be signed in to change notification settings - Fork 22
Episode6 - Assignments #18
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?
Conversation
|
Also Tiger assignment. |
|
@mee213 looks great! perfect execution. |
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.
With class variables, just doing is enough to initialize them. so your def initialize isn't needed
@@allvehicles = []|
Not sure I understand your comment on Eagle exercise #1... when then does array get appended with new instance? |
|
Oh, is this what you meant, taking out the line? |
|
Nope: Remove: def initialize
@@allvehicles << self
endAnd keep @@allvehicles = [] |
|
OK, I've made the change, but still not clear... I understand I've created an empty array, but I don't understand how it gets populated? |
|
OK, my apologies :( This is perfectly fine def initialize
@@allvehicles << self
endI thought you were doing this (which is quite common) def initialize
@@allvehicles << []
endSooooo. yeah. Everything was good on yours except the matching |
|
ok... what do you mean by "except the matching"? |
I meant this comment #18 (comment) |
|
Ok! Got it. |
Hi Jesse, here's Panda assignment for Episode 6 of Ruby Newbie. Thanks! ~Marlo