defthrow(amount,toys="toys",for: "the dog")name=for["ball","frisbee","rock","another ball","cat"].eachdo|toy|puts"threw #{toy}#{amount} times for #{name.capitalize}"endend# then these calls are validthrow4throw4,:toysthrow3,:toys,for: 'my dog'throw3,for: 'any dog'
Vicki, once a manager of aircraft maintenance, is now charming Python & Ruby. She has coded OpenGates.dev, #VetsWhoCode bot, Code Questions bot, & LGBTQ of the Day Bot. They love relatable writing.
Location
Richmond, Virginia
Education
Self Taught Python/Ruby, BBA in Small Business Mgmt, AS in Production Mgmt
Interesting. Like I said in my post, Ruby is brand new to me. Thanks for the refactor.
In def throw( amount , toys="toys, for: "the dog"), there are only 3 quotes. I there a reason they aren't in pairs? I'm not sure what this part means right now
Just edited my comment to correct the mistake.
I always try to design interfaces in a human stile. If you are able to express a method-call like a short sentence, no comments are needed.
Vicki, once a manager of aircraft maintenance, is now charming Python & Ruby. She has coded OpenGates.dev, #VetsWhoCode bot, Code Questions bot, & LGBTQ of the Day Bot. They love relatable writing.
Location
Richmond, Virginia
Education
Self Taught Python/Ruby, BBA in Small Business Mgmt, AS in Production Mgmt
Just a reminder
is more rubish
Interesting. Like I said in my post, Ruby is brand new to me. Thanks for the refactor.
In
def throw( amount , toys="toys, for: "the dog")
, there are only 3 quotes. I there a reason they aren't in pairs? I'm not sure what this part means right nowJust edited my comment to correct the mistake.
I always try to design interfaces in a human stile. If you are able to express a method-call like a short sentence, no comments are needed.
Okay, I thought maybe it was a typo, but with Ruby being new to me I wasn't sure if it was just something new to me.
Thanks for helping me out and not throwing me some
foo
bar
example