Class: Locomotive::RelationalAlgebra::Unary

Inherits:
Operator show all
Defined in:
lib/locomotive/relational_algebra/operators/basic_operators.rb

Overview

An unary Operator has exactly one child

Instance Attribute Summary

Attributes inherited from Operator

#schema

Attributes included from AstHelpers::AstNode

#kind, #left_child, #owner, #right_child, #value

Instance Method Summary collapse

Methods inherited from Operator

#bound, #free, #to_xml, #xml_content, #xml_kind, #xml_schema

Methods included from XML

included, #quote, #to_xml

Methods included from AstHelpers::Annotations

#method_missing, #respond_to?

Methods included from AstHelpers::AstNode

#has_left_child?, #has_right_child?, #is_leaf?, #traverse, #traverse_strategy=

Constructor Details

#initialize(op) ⇒ Unary

Returns a new instance of Unary.

Raises:



105
106
107
108
109
110
# File 'lib/locomotive/relational_algebra/operators/basic_operators.rb', line 105

def initialize(op)
  raise AbstractClassError,
        "#{self.class} is an abstract class" if self.class == Unary
  super()
  self.child = op
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Locomotive::AstHelpers::Annotations