Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Easily find out the truthiness of any Ruby object.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config Fixing hoe config.
lib Setting version (1.0.0), filling out README.
script
spec Fixed specs to ensure #truthy? returns only true or false.
tasks
.gitignore
History.txt Setting version (1.0.0), filling out README.
License.txt Initial creation
Manifest.txt Removing PostInstall.txt
README.txt Setting version (1.0.0), filling out README.
Rakefile Initial creation
setup.rb Initial creation

README.txt

= truthy

== DESCRIPTION:

This gem is to make it easier to discover the truth values of various Ruby
objects. Ask any object if it is truthy, and it will tell you.

== SYNOPSIS:

    require 'truthy'
    
    true.truthy?   # => true
    false.truthy?  # => false
    nil.truthy?    # => false
    
    [].truthy?                 # => true
    [nil].truthy?              # => true
    %w[one two three].truthy?  # => true
    
    {}.truthy?                 # => true
    { 'one' => 1 }.truthy?     # => true
    
    ''.truthy?                 # => true
    '   '.truthy?              # => true
    'hello'.truthy?            # => true

The possibilities are endless.

== INSTALL:

* sudo gem install truthy
Something went wrong with that request. Please try again.