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.
The fourth test test if the date objects are being set up correctly.
@wchargin, I think it's fine to use the ternary ? operator here. Is that what you meant by this isn't very Ruby?
See http://stackoverflow.com/questions/4252936/how-do-i-use-the-conditional-operator-in-ruby
Thanks @mcclaskc!
I remember having a weird logic problem somewhere which happened because I was using 'and' instead of &&, but I cannot seem to replicate it - my apologies for starting this thread! ><
haha, you're welcome :)
This comment is hidden because it contains spoiler information about the solution
This is not a good solution because "and" should not be used for logic evaluations in Ruby - "and" is a control flow operator, while && is a boolean operator.
See http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/ for more info.
Basically this code seems to work, but continuing to use "and" for boolean logic can create unexpected problems.