Module: Lazier::Boolean
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/lazier/boolean.rb
Overview
Extension for the boolean values.
Instance Method Summary (collapse)
-
- (Fixnum) to_i
Converts the boolean to an integer.
-
- (Boolean) value
Returns the boolean itself for use in form helpers.
Instance Method Details
- (Fixnum) to_i
Converts the boolean to an integer.
15 16 17 |
# File 'lib/lazier/boolean.rb', line 15 def to_i is_a?(TrueClass) ? 1 : 0 end |
- (Boolean) value
Returns the boolean itself for use in form helpers.
22 23 24 |
# File 'lib/lazier/boolean.rb', line 22 def value self end |