Class: RDF::N3::Algebra::Log::NotEqualTo

Inherits:
SPARQL::Algebra::Operator::SameTerm
  • Object
show all
Includes:
Builtin
Defined in:
lib/rdf/n3/algebra/log/not_equal_to.rb

Overview

Equality in this sense is actually the same URI. A cwm built-in logical operator.

Constant Summary collapse

NAME =
:logNotEqualTo
URI =
RDF::N3::Log.notEqualto

Instance Attribute Summary

Attributes included from Enumerable

#existentials, #universals

Instance Method Summary collapse

Methods included from Builtin

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

Instance Method Details

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

Returns ‘true` if the operands are not the same RDF term; returns `false` otherwise.

Parameters:

Returns:

  • (RDF::Literal::Boolean)

    ‘true` or `false`

Raises:

  • (TypeError)

    if either operand is unbound



19
20
21
# File 'lib/rdf/n3/algebra/log/not_equal_to.rb', line 19

def apply(term1, term2)
  RDF::Literal(!term1.eql?(term2))
end