Module: Shamu::ToBoolExtension
- Defined in:
- lib/shamu/to_bool_extension.rb
Overview
Adds to_bool to strings, numbers, booleans and nil class to provide a
consistent means of parsing values to a Boolean type.
Defined Under Namespace
Modules: Boolean, Integers, Nil, Strings
Class Method Summary collapse
-
.extend! ⇒ Object
Extend common classes to add
to_model_idmethod.
Class Method Details
.extend! ⇒ Object
Extend common classes to add to_model_id method.
8 9 10 11 12 13 14 |
# File 'lib/shamu/to_bool_extension.rb', line 8 def self.extend! String.include Strings Integer.include Integers TrueClass.include Boolean FalseClass.include Boolean NilClass.include Nil end |