Class: Zold::Txns::Cached
- Inherits:
-
Object
- Object
- Zold::Txns::Cached
- Defined in:
- lib/zold/txns.rb
Overview
Cached transactions.
- Author
-
Yegor Bugayenko ([email protected])
- Copyright
-
Copyright © 2018 Yegor Bugayenko
- License
-
MIT
Instance Method Summary collapse
- #fetch ⇒ Object
- #flush ⇒ Object
-
#initialize(txns) ⇒ Cached
constructor
A new instance of Cached.
Constructor Details
#initialize(txns) ⇒ Cached
Returns a new instance of Cached.
55 56 57 |
# File 'lib/zold/txns.rb', line 55 def initialize(txns) @txns = txns end |
Instance Method Details
#fetch ⇒ Object
63 64 65 |
# File 'lib/zold/txns.rb', line 63 def fetch @fetch ||= @txns.fetch end |
#flush ⇒ Object
59 60 61 |
# File 'lib/zold/txns.rb', line 59 def flush @fetch = nil end |