Class: Alf::Engine::Leaf
Overview
Marker for leaf compiled nodes
Constant Summary
Constants included from Cog
Cog::EMPTY_CHILDREN, Cog::EMPTY_OPTIONS
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
The initial expression.
Attributes included from Compiler::Cog
Instance Method Summary collapse
- #_each ⇒ Object
-
#initialize(operand, expr = nil, compiler = nil) ⇒ Leaf
constructor
Creates a Concat instance.
- #inspect ⇒ Object
- #to_s ⇒ Object
Methods included from Cog
#arguments, #children, #each, #options
Methods included from Compiler::Cog
#cog_orders, #orderedby?, #relation_type, #to_ascii_tree, #to_cog, #to_relation
Constructor Details
#initialize(operand, expr = nil, compiler = nil) ⇒ Leaf
Creates a Concat instance
13 14 15 16 |
# File 'lib/alf/engine/leaf.rb', line 13 def initialize(operand, expr = nil, compiler = nil) super(expr, compiler) @operand = operand end |
Instance Attribute Details
#operand ⇒ Object (readonly)
The initial expression
10 11 12 |
# File 'lib/alf/engine/leaf.rb', line 10 def operand @operand end |
Instance Method Details
#_each ⇒ Object
19 20 21 22 23 |
# File 'lib/alf/engine/leaf.rb', line 19 def _each operand.each do |tuple| yield(symbolize(tuple)) end end |
#inspect ⇒ Object
29 30 31 |
# File 'lib/alf/engine/leaf.rb', line 29 def inspect "Engine::Leaf(#{operand.inspect})" end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/alf/engine/leaf.rb', line 25 def to_s "Leaf" end |