Class: Spira::Types::NegativeInteger
- Inherits:
- 
      Object
      
        - Object
- Spira::Types::NegativeInteger
 
- Includes:
- Spira::Type
- Defined in:
- lib/spira/types/negativeInteger.rb
Overview
A Spira::Type for negative integer values. Values will be associated with the XSD.negativeInteger type.
A Resource property can reference this type as Spira::Types::NegativeInteger, NegativeInteger, or XSD.negativeInteger.
Class Method Summary collapse
Class Method Details
.serialize(value) ⇒ Object
| 20 21 22 | # File 'lib/spira/types/negativeInteger.rb', line 20 def self.serialize(value) RDF::Literal.new(value, datatype: XSD.negativeInteger) end | 
.unserialize(value) ⇒ Object
| 16 17 18 | # File 'lib/spira/types/negativeInteger.rb', line 16 def self.unserialize(value) value.object.to_i end |