Class: Zold::CachedTxns

Inherits:
Object
  • Object
show all
Defined in:
lib/zold/txns.rb

Overview

Cached transactions.

Author

Yegor Bugayenko ([email protected])

Copyright

Copyright © 2018-2025 Zerocracy

License

MIT

Instance Method Summary collapse

Constructor Details

#initialize(txns) ⇒ CachedTxns

Returns a new instance of CachedTxns.



49
50
51
# File 'lib/zold/txns.rb', line 49

def initialize(txns)
  @txns = txns
end

Instance Method Details

#fetchObject



57
58
59
# File 'lib/zold/txns.rb', line 57

def fetch
  @fetch ||= @txns.fetch
end

#flushObject



53
54
55
# File 'lib/zold/txns.rb', line 53

def flush
  @fetch = nil
end