aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/dependency_resolver/installed_specification.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-09 23:21:36 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-09 23:21:36 +0000
commit47f0248b0858898dd24d1e654cedf174059ca677 (patch)
tree493e84160f8609db408d88349f0624a3ff92c3c2 /lib/rubygems/dependency_resolver/installed_specification.rb
parentcd9f9e471977447a991ced4ea38efb2309459ef5 (diff)
downloadruby-47f0248b0858898dd24d1e654cedf174059ca677.tar.gz
* lib/rubygems: Import RubyGems 2.1
* test/rubygems: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/dependency_resolver/installed_specification.rb')
-rw-r--r--lib/rubygems/dependency_resolver/installed_specification.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/rubygems/dependency_resolver/installed_specification.rb b/lib/rubygems/dependency_resolver/installed_specification.rb
new file mode 100644
index 0000000000..af167572bf
--- /dev/null
+++ b/lib/rubygems/dependency_resolver/installed_specification.rb
@@ -0,0 +1,38 @@
+class Gem::DependencyResolver::InstalledSpecification
+
+ attr_reader :spec
+
+ def initialize set, spec, source=nil
+ @set = set
+ @source = source
+ @spec = spec
+ end
+
+ def == other # :nodoc:
+ self.class === other and
+ @set == other.set and
+ @spec == other.spec
+ end
+
+ def dependencies
+ @spec.dependencies
+ end
+
+ def full_name
+ "#{@spec.name}-#{@spec.version}"
+ end
+
+ def name
+ @spec.name
+ end
+
+ def source
+ @source ||= Gem::Source::Installed.new
+ end
+
+ def version
+ @spec.version
+ end
+
+end
+