Class: Precompiled::FileCache
Instance Method Summary
collapse
Methods inherited from BaseCache
#cache_key, #initialize
Instance Method Details
#contains?(spec) ⇒ Boolean
38
39
40
|
# File 'lib/rubygems/precompiled.rb', line 38
def contains?(spec)
File.exists?(path_for(spec))
end
|
#path_for(spec) ⇒ Object
35
36
37
|
# File 'lib/rubygems/precompiled.rb', line 35
def path_for(spec)
File.join(@root_uri.path, cache_key(spec))
end
|
#retrieve(spec) {|path_for(spec)| ... } ⇒ Object
42
43
44
|
# File 'lib/rubygems/precompiled.rb', line 42
def retrieve(spec)
yield path_for(spec)
end
|