Class: Gearbox::Types::Date
- Inherits:
-
Object
- Object
- Gearbox::Types::Date
- Includes:
- Gearbox::Type
- Defined in:
- lib/gearbox/types/date.rb
Overview
A Gearbox::Type for Date values. Values will be associated with the ‘XSD.date` type.
A Resource property can reference this type as ‘Gearbox::Types::Date`, `Date`, or `XSD.Date`.
Class Method Summary collapse
Methods included from Gearbox::Type
Class Method Details
.serialize(value) ⇒ Object
20 21 22 |
# File 'lib/gearbox/types/date.rb', line 20 def self.serialize(value) RDF::Literal::Date.new(value) end |
.unserialize(value) ⇒ Object
16 17 18 |
# File 'lib/gearbox/types/date.rb', line 16 def self.unserialize(value) value.object end |