Class: Spira::Types::AnyURI

Inherits:
Object
  • Object
show all
Includes:
Spira::Type
Defined in:
lib/spira/types/anyURI.rb

Overview

A Spira::Type for URI values. Values will be associated with the ‘XSD.anyURI` type with no language code.

A Resource property can reference this type as ‘Spira::Types::AnyURI`, `AnyURI`, or `XSD.anyURI`.

Class Method Summary collapse

Methods included from Spira::Type

included

Class Method Details

.serialize(value) ⇒ Object



20
21
22
# File 'lib/spira/types/anyURI.rb', line 20

def self.serialize(value)
  RDF::Literal.new(value, datatype: XSD.anyURI)
end

.unserialize(value) ⇒ Object



16
17
18
# File 'lib/spira/types/anyURI.rb', line 16

def self.unserialize(value)
  value.object
end