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