Class: Factbase::Times
Overview
It performs a multiplication operation over the given operands.
Instance Method Summary collapse
-
#evaluate(fact, maps, fb) ⇒ Object
Evaluate term on a fact.
-
#initialize(operands) ⇒ Times
constructor
Constructor.
Methods included from TermShared
Constructor Details
#initialize(operands) ⇒ Times
Constructor.
12 13 14 15 |
# File 'lib/factbase/terms/times.rb', line 12 def initialize(operands) super() @times = Factbase::Arithmetic.new(:*, operands) end |
Instance Method Details
#evaluate(fact, maps, fb) ⇒ Object
Evaluate term on a fact.
22 23 24 |
# File 'lib/factbase/terms/times.rb', line 22 def evaluate(fact, maps, fb) @times.evaluate(fact, maps, fb) end |