Class: Gem::Installer::BaseCache

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygems/precompiled.rb

Direct Known Subclasses

FileCache, HttpCache

Instance Method Summary collapse

Constructor Details

#initialize(root_uri) ⇒ BaseCache

Returns a new instance of BaseCache.



14
15
16
# File 'lib/rubygems/precompiled.rb', line 14

def initialize(root_uri)
  @root_uri = root_uri
end

Instance Method Details

#cache_key(spec) ⇒ Object



24
25
26
# File 'lib/rubygems/precompiled.rb', line 24

def cache_key(spec)
  "/ruby-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}/#{Gem::Platform.local.to_s}/#{spec.name}-#{spec.version}.tar.gz"
end

#contains?(spec) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/rubygems/precompiled.rb', line 21

def contains?(spec)
  false
end

#retrieve(spec) ⇒ Object



18
19
20
# File 'lib/rubygems/precompiled.rb', line 18

def retrieve(spec)
  raise "Must be overriden!"
end