class Gem::Resolver::Specification

def install options = {}

def install options = {}
  require 'rubygems/installer'
  destination = options[:install_dir] || Gem.dir
  Gem.ensure_gem_subdirectories destination
  gem = source.download spec, destination
  installer = Gem::Installer.at gem, options
  yield installer if block_given?
  @spec = installer.install
end