Skip to content

Instantly share code, notes, and snippets.

@rafaelss
Forked from tinogomes/gist:1006296
Created June 3, 2011 13:13
Show Gist options
  • Save rafaelss/1006315 to your computer and use it in GitHub Desktop.
Save rafaelss/1006315 to your computer and use it in GitHub Desktop.
.boolean? method for ruby objects
module RubyExt
module Boolean
def bool?
[ true, false ].include?(self)
end
end
end
::Object.__send__ :include, RubyExt::Boolean
@tinogomes
Copy link

pois é

;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment