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.
14 15 16 |
# File 'lib/lazier/boolean.rb', line 14 def to_i is_a?(TrueClass) ? 1 : 0 end |
- (Boolean) value
Returns the boolean itself for use in form helpers.
21 22 23 |
# File 'lib/lazier/boolean.rb', line 21 def value self end |