Class: Gem::Installer::FileCache
Instance Method Summary
collapse
Methods inherited from BaseCache
#cache_key, #initialize
Instance Method Details
#contains?(spec) ⇒ Boolean
33
34
35
|
# File 'lib/rubygems/precompiled.rb', line 33
def contains?(spec)
File.exists?(path_for(spec))
end
|
#path_for(spec) ⇒ Object
30
31
32
|
# File 'lib/rubygems/precompiled.rb', line 30
def path_for(spec)
File.join(@root_uri.path, cache_key(spec))
end
|
#retrieve(spec) {|path_for(spec)| ... } ⇒ Object
37
38
39
|
# File 'lib/rubygems/precompiled.rb', line 37
def retrieve(spec)
yield path_for(spec)
end
|