Class: RDF::N3::Algebra::Math::NotEqualTo

Inherits:
EqualTo show all
Defined in:
lib/rdf/n3/algebra/math/not_equal_to.rb

Overview

True iff the subject is a string representation of a number which is NOT EQUAL to a number of which the object is a string representation.

Constant Summary collapse

NAME =
:mathNotEqualTo
URI =
RDF::N3::Math.notEqualTo

Instance Attribute Summary

Attributes included from Enumerable

#existentials, #universals

Instance Method Summary collapse

Methods inherited from EqualTo

#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

The math:notEqualTo operator takes a pair of strings or numbers and determines if they are not the same numeric value.

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_equal_to.rb', line 21

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