summaryrefslogtreecommitdiff
path: root/lib/rubygems/resolver/specification.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/resolver/specification.rb25
1 files changed, 23 insertions, 2 deletions
@@ -31,6 +31,14 @@ class Gem::Resolver::Specification
attr_reader :source
##
# The version of the gem for this specification.
attr_reader :version
@@ -48,6 +56,13 @@ class Gem::Resolver::Specification
end
##
# The name and version of the specification.
#
# Unlike Gem::Specification#full_name, the platform is not included.
@@ -61,8 +76,11 @@ class Gem::Resolver::Specification
# install method yields a Gem::Installer instance, which indicates the
# gem will be installed, or +nil+, which indicates the gem is already
# installed.
- def install options
require 'rubygems/installer'
destination = options[:install_dir] || Gem.dir
@@ -75,7 +93,7 @@ class Gem::Resolver::Specification
yield installer if block_given?
- installer.install
end
##
@@ -85,5 +103,8 @@ class Gem::Resolver::Specification
Gem::Platform.match spec.platform
end
end