class RDF::Literal::NonPositiveInteger

nonPositiveInteger is derived from integer by setting the value of maxInclusive to be 0. This results in the standard mathematical concept of the non-positive integers. The value space of nonPositiveInteger is the infinite set ‘{…,-2,-1,0}`. The base type of nonPositiveInteger is integer.

@see www.w3.org/TR/2004/REC-xmlschema-2-20041028/#nonPositiveInteger

Constants

DATATYPE
GRAMMAR

Public Instance Methods

-@() click to toggle source

Returns ‘self` negated.

@return [RDF::Literal::Numeric]

Calls superclass method
# File lib/rdf/xsd/integer.rb, line 17
def -@
  if object != 0
    # XXX Raise error?
  end
  super
end
valid?() click to toggle source
Calls superclass method
# File lib/rdf/xsd/integer.rb, line 24
def valid?
  super && @object <= 0
end