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, #initialize, #retract

Methods inherited from AtomNode

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

Methods inherited from ParentNode

#add_out_node, #assert, #initialize, #modify, #propagate, #propagate_assert, #propagate_modify, #propagate_retract, #retract

Methods inherited from Node

#initialize, #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



498
499
500
# File 'lib/core/nodes.rb', line 498

def hash_by(atom)
  atom.value
end