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, #not_matched, #not_satisfied, #operand, #parent, #parent=, #satisfiable?, #semact?, #semantic_actions, #status, #structure_error, #to_sxp, #to_sxp_bin, #triple_expression?, #validate!

Constructor Details

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

Returns a new instance of Unary.

Parameters:

Raises:

  • (ArgumentError)


246
247
248
249
# File 'lib/shex/algebra/operator.rb', line 246

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