class Spira::Types::Date

A {Spira::Type} for dates. Values will be associated with the `XSD.date` type.

A {Spira::Resource} property can reference this type as `Spira::Types::Date`, `Date`, or `XSD.date`.

@see Spira::Type @see rdf.rubyforge.org/RDF/Literal.html

Public Class Methods

serialize(value) click to toggle source
# File lib/spira/types/date.rb, line 19
def self.serialize(value)
  RDF::Literal.new(value, datatype: XSD.date)
end
unserialize(value) click to toggle source
# File lib/spira/types/date.rb, line 15
def self.unserialize(value)
  object = value.object
end