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 Yegor Bugayenko

License

MIT

Instance Method Summary collapse

Constructor Details

#initialize(txns) ⇒ CachedTxns

Returns a new instance of CachedTxns.



66
67
68
# File 'lib/zold/txns.rb', line 66

def initialize(txns)
  @txns = txns
end

Instance Method Details

#fetchObject



74
75
76
# File 'lib/zold/txns.rb', line 74

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

#flushObject



70
71
72
# File 'lib/zold/txns.rb', line 70

def flush
  @fetch = nil
end