Class: Zold::Txns::Cached

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) ⇒ 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

#fetchObject



63
64
65
# File 'lib/zold/txns.rb', line 63

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

#flushObject



59
60
61
# File 'lib/zold/txns.rb', line 59

def flush
  @fetch = nil
end