Skip to content

Instantly share code, notes, and snippets.

@vigetlabs
Created September 26, 2008 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vigetlabs/13170 to your computer and use it in GitHub Desktop.
Save vigetlabs/13170 to your computer and use it in GitHub Desktop.
class Object
def truthy?
!(self.nil? ||
self == false ||
self == 0 ||
self == '0' ||
self == '' ||
self == [] ||
self == { } )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment