Class: Gearbox::Types::Integer

Inherits:
Object
  • Object
show all
Includes:
Gearbox::Type
Defined in:
lib/gearbox/types/integer.rb

Overview

A Gearbox::Type for integer values. Values will be associated with the ‘XSD.integer` type.

A Resource property can reference this type as ‘Gearbox::Types::Integer`, `Integer`, or `XSD.integer`.

Class Method Summary collapse

Methods included from Gearbox::Type

included

Class Method Details

.serialize(value) ⇒ Object



20
21
22
# File 'lib/gearbox/types/integer.rb', line 20

def self.serialize(value)
  RDF::Literal.new(value)
end

.unserialize(value) ⇒ Object



16
17
18
# File 'lib/gearbox/types/integer.rb', line 16

def self.unserialize(value)
  value.object
end