Installs gems for this RequestSet using the Gem::Installeroptions.
If a block is given an activation request and
installer are yielded. The installer will be nil
if a gem matching the request was
already installed.
# File lib/rubygems/request_set.rb, line 117
def install options, &block # :yields: request, installer
if dir = options[:install_dir]
return install_into dir, false, options, &block
end
cache_dir = options[:cache_dir] || Gem.dir
specs = []
sorted_requests.each do |req|
if req.installed? then
req.spec.spec.build_extensions
if @always_install.none? { |spec| spec == req.spec.spec } then
yield req, nil if block_given?
next
end
end
path = req.download cache_dir
inst = Gem::Installer.new path, options
yield req, inst if block_given?
specs << inst.install
end
specs
end