Class: ActionNode

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

Instance Method Summary collapse

Methods inherited from Node

#column

Constructor Details

#initialize(action, consequence) ⇒ ActionNode

Returns a new instance of ActionNode.



265
266
267
268
# File 'lib/code_generator.rb', line 265

def initialize action, consequence
  @action = action
  @consequence = consequence
end

Instance Method Details

#genObject



270
271
272
# File 'lib/code_generator.rb', line 270

def gen
  "ON #{@action} #{@consequence}"
end