Class: ActiveModel::Coercions::Types::Boolean
- Inherits:
-
Object
- Object
- ActiveModel::Coercions::Types::Boolean
- Defined in:
- lib/active_model/coercions/types/boolean.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ Boolean
constructor
A new instance of Boolean.
- #to_value ⇒ Object
Constructor Details
#initialize(value) ⇒ Boolean
Returns a new instance of Boolean.
5 6 7 |
# File 'lib/active_model/coercions/types/boolean.rb', line 5 def initialize(value) @value = value end |
Instance Method Details
#to_value ⇒ Object
9 10 11 |
# File 'lib/active_model/coercions/types/boolean.rb', line 9 def to_value @value.to_time end |