Class: Factbase::Tallied
- Inherits:
-
Object
- Object
- Factbase::Tallied
- Defined in:
- lib/factbase/tallied.rb
Overview
A decorator of a Factbase, that count all operations and then returns an instance of Factbase::Churn.
- Author
-
Yegor Bugayenko (yegor256@gmail.com)
- Copyright
-
Copyright © 2024-2025 Yegor Bugayenko
- License
-
MIT
Defined Under Namespace
Instance Attribute Summary collapse
-
#churn ⇒ Object
readonly
Returns the value of attribute churn.
Instance Method Summary collapse
-
#initialize(fb, churn = Factbase::Churn.new) ⇒ Tallied
constructor
A new instance of Tallied.
- #insert ⇒ Object
- #query(query, maps = nil) ⇒ Object
- #txn ⇒ Object
Constructor Details
Instance Attribute Details
#churn ⇒ Object (readonly)
Returns the value of attribute churn.
18 19 20 |
# File 'lib/factbase/tallied.rb', line 18 def churn @churn end |
Instance Method Details
#insert ⇒ Object
28 29 30 31 32 |
# File 'lib/factbase/tallied.rb', line 28 def insert f = Fact.new(@fb.insert, @churn) @churn.append(1, 0, 0) f end |