Class: Alf::Engine::Leaf

Inherits:
Object
  • Object
show all
Includes:
Cog
Defined in:
lib/alf-engine/alf/engine/leaf.rb

Overview

Marker for leaf compiled nodes

Instance Attribute Summary collapse

Attributes included from Cog

#expr

Instance Method Summary collapse

Methods included from Cog

#each, #heading, #keys, #to_cog, #to_dot, #to_relation

Constructor Details

#initialize(operand, expr = nil) ⇒ Leaf

Creates a Concat instance



13
14
15
16
# File 'lib/alf-engine/alf/engine/leaf.rb', line 13

def initialize(operand, expr = nil)
  super(expr)
  @operand = operand
end

Instance Attribute Details

#operandObject (readonly)

The initial expression



10
11
12
# File 'lib/alf-engine/alf/engine/leaf.rb', line 10

def operand
  @operand
end

Instance Method Details

#_each(&block) ⇒ Object



19
20
21
# File 'lib/alf-engine/alf/engine/leaf.rb', line 19

def _each(&block)
  operand.each(&block)
end

#to_sObject



23
24
25
# File 'lib/alf-engine/alf/engine/leaf.rb', line 23

def to_s
  "Engine::Leaf(#{operand})"
end