class Spira::Types::Time
A {Spira::Type} for times. Values will be associated with the `XSD.time` type.
A {Spira::Resource} property can reference this type as `Spira::Types::Time`, `Time`, or `XSD.time`.
Public Class Methods
serialize(value)
click to toggle source
# File lib/spira/types/time.rb, line 19 def self.serialize(value) RDF::Literal.new(value, datatype: XSD.time) end
unserialize(value)
click to toggle source
# File lib/spira/types/time.rb, line 15 def self.unserialize(value) object = value.object.to_time end