Class: Factbase::Prev
Overview
during iteration, enabling comparisons between consecutive facts.
Instance Method Summary collapse
-
#evaluate(fact, maps, fb) ⇒ Object
Evaluate term on a fact.
-
#initialize(operands) ⇒ Prev
constructor
Constructor.
Methods inherited from TermBase
Constructor Details
#initialize(operands) ⇒ Prev
Constructor.
12 13 14 15 |
# File 'lib/factbase/terms/prev.rb', line 12 def initialize(operands) super() @operands = operands end |
Instance Method Details
#evaluate(fact, maps, fb) ⇒ Object
Evaluate term on a fact.
22 23 24 25 |
# File 'lib/factbase/terms/prev.rb', line 22 def evaluate(fact, maps, fb) assert_args(1) @prev.tap { @prev = _values(0, fact, maps, fb) } end |