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