Class: Factbase::Absent
- Defined in:
- lib/factbase/terms/absent.rb
Overview
Represents a term that evaluates to true if the specified operand is absent in the fact.
Instance Method Summary collapse
-
#evaluate(fact, _maps, _fb) ⇒ Boolean
Evaluate term on a fact.
-
#initialize(operands) ⇒ Absent
constructor
Constructor.
Methods included from TermShared
Constructor Details
#initialize(operands) ⇒ Absent
Constructor.
12 13 14 15 |
# File 'lib/factbase/terms/absent.rb', line 12 def initialize(operands) super() @operands = operands end |
Instance Method Details
#evaluate(fact, _maps, _fb) ⇒ Boolean
Evaluate term on a fact.
22 23 24 25 |
# File 'lib/factbase/terms/absent.rb', line 22 def evaluate(fact, _maps, _fb) assert_args(1) _by_symbol(0, fact).nil? end |