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
-
#tracer ⇒ Object
Returns the value of attribute tracer.
Attributes inherited from BetaMemory
Attributes inherited from BetaNode
Instance Method Summary collapse
- #beta_activate(token, wme, assignments) ⇒ Object
-
#initialize(parent, actions) ⇒ ProductionNode
constructor
A new instance of ProductionNode.
Methods inherited from BetaMemory
#delete_token, #refresh_child, #seed, #subst
Methods inherited from BetaNode
#assignment_node, #beta_memory, #delete_token, #depth, #filter_node, #join_node, #ncc_node, #neg_node, #network, #optional_node, #refresh, #refresh_child
Methods included from CoreExt
Constructor Details
#initialize(parent, actions) ⇒ ProductionNode
Returns a new instance of ProductionNode.
8 9 10 11 12 |
# File 'lib/wongi-engine/beta/production_node.rb', line 8 def initialize parent, actions super(parent) @actions = actions @actions.each { |action| action.production = self } end |
Instance Attribute Details
#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, wme, assignments) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/wongi-engine/beta/production_node.rb', line 14 def beta_activate token, wme, assignments super @actions.each do |action| # @tokens.each do |t| # action.execute t # end action.execute tokens.last if action.respond_to? :execute end end |