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