Class: Wongi::Engine::FilterNode
- Defined in:
- lib/wongi-engine/beta/filter_node.rb
Instance Attribute Summary collapse
-
#test ⇒ Object
Returns the value of attribute test.
Attributes inherited from BetaNode
Instance Method Summary collapse
- #equivalent?(test) ⇒ Boolean
-
#initialize(parent, test) ⇒ FilterNode
constructor
A new instance of FilterNode.
- #left_activate(token) ⇒ Object
Methods inherited from BetaNode
#beta_memory, #depth, #filter_node, #join_node, #ncc_node, #neg_node, #network, #optional_node, #update_above
Methods included from CoreExt
Constructor Details
#initialize(parent, test) ⇒ FilterNode
Returns a new instance of FilterNode.
93 94 95 96 |
# File 'lib/wongi-engine/beta/filter_node.rb', line 93 def initialize parent, test super parent self.test = test end |
Instance Attribute Details
#test ⇒ Object
Returns the value of attribute test.
91 92 93 |
# File 'lib/wongi-engine/beta/filter_node.rb', line 91 def test @test end |
Instance Method Details
#equivalent?(test) ⇒ Boolean
104 105 106 |
# File 'lib/wongi-engine/beta/filter_node.rb', line 104 def equivalent? test test == self.test end |
#left_activate(token) ⇒ Object
98 99 100 101 102 |
# File 'lib/wongi-engine/beta/filter_node.rb', line 98 def left_activate token if test.passes? token propagate_activation token, nil, {} end end |