class Spira::Types::String

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 rdf.rubyforge.org/RDF/Literal.html

Public Class Methods

serialize(value) click to toggle source
# File lib/spira/types/string.rb, line 20
def self.serialize(value)
  RDF::Literal.new(value.to_s)
end
unserialize(value) click to toggle source
# File lib/spira/types/string.rb, line 16
def self.unserialize(value)
  value.object.to_s
end