wannabe_bool
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
Repository
wannabe_bool
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- over 7 years ago
- May 4, 2017
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 08:22:12 GMT
Languages