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.
awesome solution
It's a double negation. First it negates a false-ish value (nil or false) to true and then negates it false. With this method you have only true or false output and not true, false or nil.
Indeed. This code is too complex and slow. It may seems "clever", but its definitely not BP
yours solution doesn't work for:
Nice one liner!
But it will fail if returned value is 'false'.
It's not a method, it's a keyword. It's equivalent to a try/catch statement in some other languages.
This may help:
http://rubylearning.com/satishtalim/ruby_exceptions.html
I don't know how to use that rescue method there. I can't find any documentation anywhere!
It would be better if no 'resuce' logic.
Incorrectly converts THE-STEALTH-WARRIOR into THESTEALTHWARRIOR instead of into TheStealthWarrior
One of the requirements is that it must throw NoMethodError if the Hash doesn't include the key. If a default is defined, this solution will return the default anytime the method is missing even if the key doesn't exist.
Still, it passes all the tests and it's succint. Kudos to you!