Class: Factbase::Eq
Overview
Represents an equality term in the Factbase. This class encapsulates the evaluation of equality comparisons between operands within the context of a Factbase.
Instance Method Summary collapse
-
#evaluate(fact, maps, fb) ⇒ Boolean
Evaluate term on a fact.
-
#initialize(operands) ⇒ Eq
constructor
Constructor.
Methods included from TermShared
Constructor Details
#initialize(operands) ⇒ Eq
Constructor.
15 16 17 18 |
# File 'lib/factbase/terms/eq.rb', line 15 def initialize(operands) super() @op = Factbase::Compare.new(:==, operands) end |
Instance Method Details
#evaluate(fact, maps, fb) ⇒ Boolean
Evaluate term on a fact.
25 26 27 |
# File 'lib/factbase/terms/eq.rb', line 25 def evaluate(fact, maps, fb) @op.evaluate(fact, maps, fb) end |