Class: RDF::Literal::Short

Inherits:
Int
  • Object
show all
Defined in:
lib/rdf/xsd/integer.rb

Overview

short is derived from int by setting the value of maxInclusive to be 32767 and minInclusive to be -32768. The base type of short is int.

Direct Known Subclasses

Byte

Constant Summary collapse

DATATYPE =
RDF::XSD.short

Instance Method Summary collapse

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/rdf/xsd/integer.rb', line 90

def valid?
  super && @object >= -32768 && @object <= 32767
end