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.

See Also:

Direct Known Subclasses

Byte

Constant Summary

DATATYPE =
RDF::XSD.short

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) valid?

Returns:

  • (Boolean)


92
93
94
# File 'lib/rdf/xsd/integer.rb', line 92

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