Uh oh!
There was an error while loading. Please reload this page.
Episode6 - Assignments - #18
Conversation
mee213
commented
Jan 22, 2014
Also Tiger assignment. |
jwo
commented
Jan 22, 2014
@mee213 looks great! perfect execution. |
mee213
commented
Jan 22, 2014
There was a problem hiding this comment.
With class variables, just doing is enough to initialize them. so your def initialize isn't needed
@@allvehicles=[]mee213
commented
Jan 22, 2014
Not sure I understand your comment on Eagle exercise #1... when then does array get appended with new instance? |
mee213
commented
Jan 22, 2014
Oh, is this what you meant, taking out the line? |
jwo
commented
Jan 22, 2014
Nope: Remove: definitialize@@allvehicles << selfendAnd keep @@allvehicles=[] |
mee213
commented
Jan 22, 2014
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? |
jwo
commented
Jan 22, 2014
OK, my apologies :( This is perfectly fine definitialize@@allvehicles << selfendI thought you were doing this (which is quite common) definitialize@@allvehicles << []endSooooo. yeah. Everything was good on yours except the matching |
mee213
commented
Jan 22, 2014
ok... what do you mean by "except the matching"? |
jwo
commented
Jan 22, 2014
I meant this comment #18 (comment) |
mee213
commented
Jan 23, 2014
Ok! Got it. |
Hi Jesse, here's Panda assignment for Episode 6 of Ruby Newbie. Thanks! ~Marlo