To answer the second question, your method will change subtly if you remove the double negation, since you will return an object instead of TrueClass or FalseClass.
The !! usually disapproving if you clearly don't need boolean values (for example, if you are creating an API) Since Ruby evaluates any non-nil and non-false values as true, it is usually safe to simply return the object in question so that you can call its methods.
Raphomet Sep 29 '10 at 17:22 2010-09-29 17:22
source share