https://github.com/janijegoroff/to_boolean
Ruby core extension that converts string and integer values to boolean.
https://github.com/janijegoroff/to_boolean
Last synced: 4 months ago
JSON representation
Ruby core extension that converts string and integer values to boolean.
- Host: GitHub
- URL: https://github.com/janijegoroff/to_boolean
- Owner: JaniJegoroff
- Created: 2014-09-10T21:43:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-10-25T12:51:52.000Z (over 7 years ago)
- Last Synced: 2025-03-19T06:03:56.059Z (4 months ago)
- Language: Ruby
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](http://badge.fury.io/rb/to_boolean)
[](https://travis-ci.org/JaniJegoroff/to_boolean)
[](https://coveralls.io/r/JaniJegoroff/to_boolean?branch=master)
[](https://codeclimate.com/github/JaniJegoroff/to_boolean)
[](https://gemnasium.com/JaniJegoroff/to_boolean)to_boolean
==========Ruby core extension that converts string and integer values to boolean.
Installation
==========In your Gemfile:
`gem 'to_boolean'`
Install gem manually:
`$ gem install to_boolean`
Usage
==========`'true'.to_boolean #=> true`
`1.to_boolean #=> true`
`'false'.to_boolean #=> false`
`0.to_boolean #=> false`
See more from **spec/spec_to_boolean.rb**.
Run the tests
==========`$ bundle`
`$ bundle exec rake`
License
==========MIT