Class: Loveseat::Document::Property::Date
- Defined in:
- lib/loveseat/document/property/date.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
#empty?, #get, #initialize, #set
Constructor Details
This class inherits a constructor from Loveseat::Document::Property::Base
Class Method Details
.cast(value) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/loveseat/document/property/date.rb', line 7 def self.cast(value) if value.is_a?(::Date) return value end ::Date.parse(value) end |