Class: Ruleby::Core::InheritsNode
- Inherits:
-
TypeNode
- Object
- Printable
- Node
- ParentNode
- AtomNode
- HashedNode
- TypeNode
- Ruleby::Core::InheritsNode
- Defined in:
- lib/core/nodes.rb
Overview
This class is used for the same purpose as the TypeNode, but it matches if the fact’s inheritance chain includes the specified class.
Instance Attribute Summary
Attributes inherited from AtomNode
Attributes inherited from ParentNode
Attributes inherited from Printable
Instance Method Summary collapse
Methods inherited from TypeNode
#hash_by, #propagate, #retract
Methods inherited from HashedNode
#add_out_node, #initialize, #retract
Methods inherited from AtomNode
#==, #initialize, #shareable?, #to_s
Methods inherited from ParentNode
#add_out_node, #initialize, #modify, #propagate, #propagate_assert, #propagate_modify, #propagate_retract, #retract
Methods inherited from Node
Methods inherited from Printable
Constructor Details
This class inherits a constructor from Ruleby::Core::HashedNode
Instance Method Details
#assert(fact) ⇒ Object
456 457 458 459 460 |
# File 'lib/core/nodes.rb', line 456 def assert(fact) @values.each do |clazz,nodes| propagate_assert fact, nodes if clazz === fact.object end end |