Class: OdataDuty::EdmDate
Constant Summary collapse
- OAS_TYPE =
{ 'type' => 'string', 'format' => 'date' }.freeze
Class Method Summary collapse
Methods inherited from EdmBase
Class Method Details
.property_type ⇒ Object
51 52 53 |
# File 'lib/odata_duty/edms.rb', line 51 def self.property_type 'Edm.Date' end |
.to_oas2(is_collection:) ⇒ Object
57 58 59 60 61 |
# File 'lib/odata_duty/edms.rb', line 57 def self.to_oas2(is_collection:) return { 'type' => 'array', 'items' => OAS_TYPE } if is_collection OAS_TYPE end |
.to_value(object, _context) ⇒ Object
63 64 65 66 67 |
# File 'lib/odata_duty/edms.rb', line 63 def self.to_value(object, _context) object.to_date.iso8601 rescue StandardError => e raise InvalidValue, e end |