Class: BadLinkFinder::ResultCache
- Inherits:
-
Object
- Object
- BadLinkFinder::ResultCache
- Defined in:
- lib/bad_link_finder/result_cache.rb
Instance Method Summary collapse
- #fetch(key) ⇒ Object
-
#initialize ⇒ ResultCache
constructor
A new instance of ResultCache.
- #store(key, link) ⇒ Object
Constructor Details
#initialize ⇒ ResultCache
Returns a new instance of ResultCache.
6 7 8 |
# File 'lib/bad_link_finder/result_cache.rb', line 6 def initialize @cache = {} end |
Instance Method Details
#fetch(key) ⇒ Object
14 15 16 |
# File 'lib/bad_link_finder/result_cache.rb', line 14 def fetch(key) @cache[stripped_key(key)] end |
#store(key, link) ⇒ Object
10 11 12 |
# File 'lib/bad_link_finder/result_cache.rb', line 10 def store(key, link) @cache[stripped_key(key)] = link end |