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