Class: RDF::Literal::UnsignedByte

Inherits:
UnsignedShort show all
Defined in:
vendor/bundler/ruby/2.5.0/bundler/gems/rdf-xsd-e532a0ab7189/lib/rdf/xsd/integer.rb

Overview

unsignedByte is derived from unsignedShort by setting the value of maxInclusive to be 255. The base type of unsignedByte is unsignedShort.

Constant Summary collapse

DATATYPE =
RDF::XSD.unsignedByte

Constants inherited from UnsignedLong

RDF::Literal::UnsignedLong::GRAMMAR

Constants inherited from NonNegativeInteger

NonNegativeInteger::GRAMMAR

Instance Method Summary collapse

Methods inherited from Integer

#to_sxp

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


186
187
188
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/rdf-xsd-e532a0ab7189/lib/rdf/xsd/integer.rb', line 186

def valid?
  super && @object >= 0 && @object <= 255
end