Class: RDF::N3::Algebra::Math::NotGreaterThan

Inherits:
GreaterThan show all
Defined in:
lib/rdf/n3/algebra/math/not_greater_than.rb

Overview

True iff the subject is a string representation of a number which is NOT greater than the number of which the object is a string representation.

Constant Summary collapse

NAME =
:mathNotGreaterThan
URI =
RDF::N3::Math.notGreaterThan

Instance Attribute Summary

Attributes included from Enumerable

#existentials, #universals

Instance Method Summary collapse

Methods inherited from GreaterThan

#input_operand, #resolve

Methods inherited from ResourceOperator

#as_literal, #execute, #input_operand, #resolve, #valid?

Methods included from Builtin

#each, #evaluate, #hash, #input_operand, #rank, #to_uri

Instance Method Details

#apply(term1, term2) ⇒ RDF::Literal::Boolean

Returns TRUE if term1 is less than or equal to term2.

Parameters:

Returns:

  • (RDF::Literal::Boolean)

    true or false

Raises:

  • (TypeError)

    if either operand is not an RDF term or operands are not comperable

See Also:

  • Term#==


21
22
23
# File 'lib/rdf/n3/algebra/math/not_greater_than.rb', line 21

def apply(term1, term2)
  RDF::Literal(super != RDF::Literal::TRUE)
end