Sha256: 7c1bced96d397c0200f94c94e982a0695187b21e4308ec5a22c1e8590f0f4003
Contents?: true
Size: 541 Bytes
Versions: 10
Compression:
Stored size: 541 Bytes
Contents
module Spira::Types ## # 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 http://rdf.rubyforge.org/RDF/Literal.html class Date include Spira::Type def self.unserialize(value) object = value.object end def self.serialize(value) RDF::Literal.new(value, :datatype => XSD.date) end register_alias XSD.date end end
Version data entries
10 entries across 10 versions & 1 rubygems