Class: Wongi::Engine::ProductionNode
- Inherits:
-
BetaMemory
- Object
- BetaNode
- BetaMemory
- Wongi::Engine::ProductionNode
- Defined in:
- lib/wongi-engine/beta/production_node.rb
Instance Attribute Summary collapse
-
#compilation_context ⇒ Object
Returns the value of attribute compilation_context.
-
#tracer ⇒ Object
Returns the value of attribute tracer.
Attributes inherited from BetaNode
Instance Method Summary collapse
- #beta_activate(token) ⇒ Object
- #beta_deactivate(token) ⇒ Object
-
#initialize(parent, actions) ⇒ ProductionNode
constructor
A new instance of ProductionNode.
Methods inherited from BetaMemory
Methods inherited from BetaNode
#assignment_node, #depth, #refresh, #refresh_child, #root?
Methods included from CoreExt
Constructor Details
#initialize(parent, actions) ⇒ ProductionNode
Returns a new instance of ProductionNode.
9 10 11 12 |
# File 'lib/wongi-engine/beta/production_node.rb', line 9 def initialize parent, actions super(parent) @actions = actions.each { |action| action.production = self } end |
Instance Attribute Details
#compilation_context ⇒ Object
Returns the value of attribute compilation_context.
7 8 9 |
# File 'lib/wongi-engine/beta/production_node.rb', line 7 def compilation_context @compilation_context end |
#tracer ⇒ Object
Returns the value of attribute tracer.
6 7 8 |
# File 'lib/wongi-engine/beta/production_node.rb', line 6 def tracer @tracer end |
Instance Method Details
#beta_activate(token) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/wongi-engine/beta/production_node.rb', line 14 def beta_activate token return unless super @actions.each do |action| action.execute token if action.respond_to? :execute end end |
#beta_deactivate(token) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/wongi-engine/beta/production_node.rb', line 21 def beta_deactivate token return unless super @actions.each do |action| action.deexecute token if action.respond_to? :deexecute end end |