Ruby Boolean
This is an extremely simple addition of a Boolean module.
Install:
gem install 'ruby-boolean'
or in your Gemfile
gem 'ruby-boolean'
Its purpose to avoid doing:
foo = true
if foo.is_a?(TrueClass) || foo.is_a?(FalseClass)
# do something that's specific to booleans
end
Now it can be reduced to:
require 'ruby-boolean'
true.is_a?(Boolean) #=> true
false.is_a?(Boolean) #=> true
"foo".is_a?(Boolean) #=> false