Class: Factbase::Plus
Overview
Represents a Plus term in the Factbase system. This class is used to perform addition operations on operands.
Instance Method Summary collapse
-
#evaluate(fact, maps, fb) ⇒ Object
Evaluate term on a fact.
-
#initialize(operands) ⇒ Plus
constructor
Constructor.
Methods included from TermShared
Constructor Details
#initialize(operands) ⇒ Plus
Constructor.
14 15 16 17 |
# File 'lib/factbase/terms/plus.rb', line 14 def initialize(operands) super() @plus = Factbase::Arithmetic.new(:+, operands) end |
Instance Method Details
#evaluate(fact, maps, fb) ⇒ Object
Evaluate term on a fact.
24 25 26 |
# File 'lib/factbase/terms/plus.rb', line 24 def evaluate(fact, maps, fb) @plus.evaluate(fact, maps, fb) end |