Class: TwoWaySQL::SubStatementNode

Inherits:
Node
  • Object
show all
Defined in:
lib/twowaysql/node.rb

Instance Method Summary collapse

Constructor Details

#initialize(first_node, tree) ⇒ SubStatementNode

Returns a new instance of SubStatementNode.



133
134
135
136
# File 'lib/twowaysql/node.rb', line 133

def initialize(first_node, tree)
  @first_node = first_node
  @tree = tree
end

Instance Method Details

#accept(ctx) ⇒ Object



137
138
139
140
# File 'lib/twowaysql/node.rb', line 137

def accept(ctx)
  ctx.add_sql(@first_node) if ctx.enabled?
  exec_list(@tree, ctx)
end

#each {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



141
142
143
# File 'lib/twowaysql/node.rb', line 141

def each
  yield self
end