Sha256: 4045ae24624b9adb8d39787b249db21194e46fab1ac27f7309f46bd0fa37289e
Contents?: true
Size: 573 Bytes
Versions: 1
Compression:
Stored size: 573 Bytes
Contents
module Spira::Types ## # A {Spira::Type} for string values. Values will be associated with the # `XSD.string` type with no language code. # # A {Spira::Resource} property can reference this type as # `Spira::Types::String`, `String`, or `XSD.string`. # # @see Spira::Type # @see https://ruby-rdf.github.io/rdf/RDF/Literal.html class String include Spira::Type def self.unserialize(value) value.object.to_s end def self.serialize(value) RDF::Literal.new(value.to_s) end register_alias RDF::XSD.string end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spira-3.3.0 | lib/spira/types/string.rb |