Module: Factbase::Debug
- Included in:
- Term
- Defined in:
- lib/factbase/terms/debug.rb
Overview
Debug terms.
- Author
-
Yegor Bugayenko ([email protected])
- Copyright
-
Copyright © 2024-2025 Yegor Bugayenko
- License
-
MIT
Instance Method Summary collapse
Instance Method Details
#traced(fact, maps, fb) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/factbase/terms/debug.rb', line 14 def traced(fact, maps, fb) assert_args(1) t = @operands[0] raise "A term expected, but '#{t}' provided" unless t.is_a?(Factbase::Term) r = t.evaluate(fact, maps, fb) puts "#{self} -> #{r}" r end |