Sha256: b68465cee2f913695f7930ddc95de4d44dd7f8c5809259b95540937eb218dd3d

Contents?: true

Size: 686 Bytes

Versions: 4

Compression:

Stored size: 686 Bytes

Contents

module RDF::N3::Algebra::Log
  ##
  # Equality in this sense is actually the same URI. A cwm built-in logical operator.
  class NotEqualTo < SPARQL::Algebra::Operator::SameTerm
    include RDF::N3::Algebra::Builtin
    NAME = :logNotEqualTo
    URI = RDF::N3::Log.notEqualto

    ##
    # Returns `true` if the operands are not the same RDF term; returns
    # `false` otherwise.
    #
    # @param  [RDF::Term] term1
    #   an RDF term
    # @param  [RDF::Term] term2
    #   an RDF term
    # @return [RDF::Literal::Boolean] `true` or `false`
    # @raise  [TypeError] if either operand is unbound
    def apply(term1, term2)
      RDF::Literal(!term1.eql?(term2))
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rdf-n3-3.3.0 lib/rdf/n3/algebra/log/not_equal_to.rb
rdf-n3-3.2.1 lib/rdf/n3/algebra/log/not_equal_to.rb
rdf-n3-3.2.0 lib/rdf/n3/algebra/log/not_equal_to.rb
rdf-n3-3.1.2 lib/rdf/n3/algebra/log/not_equal_to.rb