Class: TwoWaySQL::SubStatementNode

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

Instance Method Summary collapse

Constructor Details

#initialize(prefix, tree) ⇒ SubStatementNode

Returns a new instance of SubStatementNode.



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

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

Instance Method Details

#accept(ctx) ⇒ Object



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

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

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

Yields:

  • (_self)

Yield Parameters:



144
145
146
# File 'lib/twowaysql/node.rb', line 144

def each
  yield self
end