wannabe_bool
An implementation of prodis/wannabe_bool in Crystal
Installation
Add this to your application's shard.yml:
dependencies:
  wannabe_bool:
    github: llamicron/wannabe_bool
    branch: master
Usage
require "wannabe_bool"
Strings, nil, symbols, and integers can be casted to booleans with:
nil.to_b      # => false
"true".to_b   # => true
"y".to_b      # => true
"false".to_b  # => false
"string".to_b # => false
:true.to_b    # => true
:false.to_b   # => true
1.to_b        # => true
0.to_b        # => false
Contributing
- Fork it ( https://github.com/llamicron/wannabe_bool/fork )
 - Create your feature branch (git checkout -b my-new-feature)
 - Commit your changes (git commit -am 'Add some feature')
 - Push to the branch (git push origin my-new-feature)
 - Create a new Pull Request
 
Contributors
- llamicron | Luke Sweeney - creator, maintainer