class Spira::Types::NegativeInteger
A {Spira::Type} for negative integer values. Values will be associated with the `XSD.negativeInteger` type.
A {Spira::Resource} property can reference this type as `Spira::Types::NegativeInteger`, `NegativeInteger`, or `XSD.negativeInteger`.
Public Class Methods
serialize(value)
click to toggle source
# File lib/spira/types/negativeInteger.rb, line 20 def self.serialize(value) RDF::Literal.new(value, datatype: XSD.negativeInteger) end
unserialize(value)
click to toggle source
# File lib/spira/types/negativeInteger.rb, line 16 def self.unserialize(value) value.object.to_i end