Class: ShEx::Algebra::Operator::Binary Abstract

Inherits:
ShEx::Algebra::Operator show all
Defined in:
lib/shex/algebra/operator.rb

Overview

This class is abstract.

A binary operator.

Operators of this kind take two operands.

Direct Known Subclasses

StemRange

Constant Summary collapse

ARITY =
2

Instance Attribute Summary

Attributes inherited from ShEx::Algebra::Operator

#id, #logger, #operands, #options, #schema

Instance Method Summary collapse

Methods inherited from ShEx::Algebra::Operator

#base_uri, #closed?, #dup, #each_descendant, #eql?, #expression, #expressions, #find, #focus, #focus=, from_shexj, #inspect, #iri, iri, #json_type, #matched, #matched=, #message, #message=, #not_matched, #not_satisfied, #operand, #parent, #parent=, #references, #satisfied, #satisfied=, #satisfy, #semact?, #semantic_actions, #serialize_value, #status, #structure_error, #to_h, #to_json, #to_sxp, #to_sxp_bin, #triple_expression?, #unmatched, #unmatched=, #unsatisfied, #unsatisfied=, #validate!, #value, value

Constructor Details

#initialize(arg1, arg2, **options) ⇒ Binary

Returns a new instance of Binary.

Parameters:

  • arg1 (RDF::Term)

    the first operand

  • arg2 (RDF::Term)

    the second operand

  • options (Hash{Symbol => Object})

    any additional options (see ShEx::Algebra::Operator#initialize)

Raises:

  • (ArgumentError)


718
719
720
721
# File 'lib/shex/algebra/operator.rb', line 718

def initialize(arg1, arg2, **options)
  raise ArgumentError, "wrong number of arguments (given 3, expected 2)" unless options.is_a?(Hash)
  super
end