Class: Ruleby::Core::EqualsNode

Inherits:
HashedNode show all
Defined in:
lib/core/nodes.rb

Overview

This node class is used for matching properties of a fact where the condition is a simple ‘==’. Instead of evaluating the condition, this node will pull from a hash. This makes it significatly fast when it is shared.

Instance Attribute Summary

Attributes inherited from AtomNode

#atom

Attributes inherited from ParentNode

#child_nodes

Attributes inherited from Printable

#parent_nodes

Instance Method Summary collapse

Methods inherited from HashedNode

#add_out_node, #assert, #forks?, #initialize, #retract

Methods inherited from AtomNode

#==, #initialize, #shareable?, #to_s

Methods inherited from ParentNode

#add_out_node, #assert, #forks?, #initialize, #propagate_assert, #propagate_retract, #retract

Methods inherited from Node

#resolve

Methods inherited from Printable

#initialize, #print

Constructor Details

This class inherits a constructor from Ruleby::Core::HashedNode

Instance Method Details

#hash_by(atom) ⇒ Object



425
426
427
# File 'lib/core/nodes.rb', line 425

def hash_by(atom)
  atom.value
end