Class: RDF::Literal::PositiveInteger

Inherits:
NonNegativeInteger show all
Defined in:
lib/rdf/xsd/integer.rb

Overview

positiveInteger is derived from nonNegativeInteger by setting the value of minInclusive to be 1. This results in the standard mathematical concept of the positive integer numbers. The value space of positiveInteger is the infinite set [1,2,…]. The base type of positiveInteger is nonNegativeInteger.

Constant Summary collapse

GRAMMAR =
/^\+?\d+$/.freeze
DATATYPE =
RDF::XSD.positiveInteger

Instance Method Summary collapse

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


133
134
135
# File 'lib/rdf/xsd/integer.rb', line 133

def valid?
  super && @object > 0
end