Project

to_boolean

0.0
No commit activity in last 3 years
No release in over 3 years
Core extension that converts string and integer values to boolean.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.4
~> 10.3
~> 0.26
 Project Readme

Gem Version Build Status Coverage Status Code Climate Dependency Status

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