Class: ShEx::Algebra::Operator::Unary Abstract

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

Overview

This class is abstract.

A unary operator.

Operators of this kind take one operand.

Direct Known Subclasses

Not, ShapeRef, Start, Stem, Value

Constant Summary collapse

ARITY =
1

Instance Attribute Summary

Attributes inherited from ShEx::Algebra::Operator

#operands, #options, #schema

Instance Method Summary collapse

Methods inherited from ShEx::Algebra::Operator

#closed?, #each_descendant, #eql?, #first_ancestor, #inspect, #matched, #matched=, #not_matched, #not_satisfied, #operand, #parent, #parent=, #satisfiable?, #satisfied, #satisfied=, #satisfy, #semact?, #semantic_actions, #status, #structure_error, #to_sxp, #to_sxp_bin, #triple_expression?, #unmatched, #unmatched=, #unsatisfied, #unsatisfied=, #validate!

Constructor Details

#initialize(arg1, options = {}) ⇒ Unary

Returns a new instance of Unary.

Parameters:

Raises:

  • (ArgumentError)


313
314
315
316
# File 'lib/shex/algebra/operator.rb', line 313

def initialize(arg1, options = {})
  raise ArgumentError, "wrong number of arguments (given 2, expected 1)" unless options.is_a?(Hash)
  super
end