Class: Locomotive::RelationalAlgebra::Binary
- Inherits:
-
Operator
- Object
- RelAlgAstNode
- Operator
- Locomotive::RelationalAlgebra::Binary
- Defined in:
- lib/locomotive/relational_algebra/operators/basic_operators.rb
Overview
A binary operator has exactly two children
Instance Attribute Summary
Attributes inherited from Operator
Attributes included from AstHelpers::AstNode
#kind, #left_child, #owner, #right_child, #value
Instance Method Summary collapse
-
#initialize(op1, op2) ⇒ Binary
constructor
A new instance of Binary.
-
#left_and_right(op1, op2) ⇒ Object
alias :left= :left_child= def_sig :left=, Operator alias :right= :right_child= def_sig :right=, Operator.
Methods inherited from Operator
#bound, #free, #to_xml, #xml_content, #xml_kind, #xml_schema
Methods included from XML
Methods included from AstHelpers::Annotations
Methods included from AstHelpers::AstNode
#has_left_child?, #has_right_child?, #is_leaf?, #traverse, #traverse_strategy=
Constructor Details
#initialize(op1, op2) ⇒ Binary
Returns a new instance of Binary.
134 135 136 137 138 139 |
# File 'lib/locomotive/relational_algebra/operators/basic_operators.rb', line 134 def initialize(op1, op2) raise AbstractClassError, "#{self.class} is an abstract class" if self.class == Binary super() left_and_right(op1,op2) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Locomotive::AstHelpers::Annotations
Instance Method Details
#left_and_right(op1, op2) ⇒ Object
alias :left= :left_child= def_sig :left=, Operator alias :right= :right_child= def_sig :right=, Operator
129 130 131 132 |
# File 'lib/locomotive/relational_algebra/operators/basic_operators.rb', line 129 def left_and_right(op1, op2) self.left_child = op1 self.right_child = op2 end |