Sha256: 05b9492502fdfbafe976ebf2727d5da34195017963b46a52b4ad2cfc99cec6a7
Contents?: true
Size: 555 Bytes
Versions: 1
Compression:
Stored size: 555 Bytes
Contents
module Spira::Types ## # A {Spira::Type} for gYear. Values will be associated with the # `XSD.gYear` type. # # A {Spira::Resource} property can reference this type as # `Spira::Types::GYear`, `GYear`, or `XSD.gYear`. # # @see Spira::Type # @see http://rdf.rubyforge.org/RDF/Literal.html class GYear include Spira::Type def self.unserialize(value) object = value.object.to_i end def self.serialize(value) RDF::Literal.new(value, datatype: XSD.gYear) end register_alias RDF::XSD.gYear end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spira-3.1.1 | lib/spira/types/gYear.rb |