Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The $ is just a character in the string. Is there a reason you think it would need to be escaped?
How come the $ does not need to be escaped in this solution?
This comment is hidden because it contains spoiler information about the solution
this is the best
Thanks
This is the so called "ternary operator":
http://www.w3resource.com/ruby/ruby-ternary-operator.php
is a shortcut for:
what does ? and : mean in ruby
Nice one, but I believe the description could use some improvements - specifically, I think it should be more specific about the argument names.
There's no information indicating whether the argument names should be extracted from the value (as the usage example might imply) or fixed arg names should be used (as the test cases seem to indicate).
I'm guessing the latter was the original intent, but seeing how most solutions focus on parsing the values, the description definitely is not clear enough in this regard.