Class: BadLinkFinder::ResultCache

Inherits:
Object
  • Object
show all
Defined in:
lib/bad_link_finder/result_cache.rb

Instance Method Summary collapse

Constructor Details

#initializeResultCache

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