aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/dependency_resolver/specification.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/dependency_resolver/specification.rb')
-rw-r--r--lib/rubygems/dependency_resolver/specification.rb60
1 files changed, 60 insertions, 0 deletions
diff --git a/lib/rubygems/dependency_resolver/specification.rb b/lib/rubygems/dependency_resolver/specification.rb
new file mode 100644
index 0000000000..6fbd241316
--- /dev/null
+++ b/lib/rubygems/dependency_resolver/specification.rb
@@ -0,0 +1,60 @@
+##
+# A DependencyResolver::Specification contains a subset of the information
+# contained in a Gem::Specification. Only the information necessary for
+# dependency resolution in the resolver is included.
+
+class Gem::DependencyResolver::Specification
+
+ ##
+ # The dependencies of the gem for this specification
+
+ attr_reader :dependencies
+
+ ##
+ # The name of the gem for this specification
+
+ attr_reader :name
+
+ ##
+ # The platform this gem works on.
+
+ attr_reader :platform
+
+ ##
+ # The set this specification came from.
+
+ attr_reader :set
+
+ ##
+ # The source for this specification
+
+ attr_reader :source
+
+ ##
+ # The version of the gem for this specification.
+
+ attr_reader :version
+
+ ##
+ # Sets default instance variables for the specification.
+
+ def initialize
+ @dependencies = nil
+ @name = nil
+ @platform = nil
+ @set = nil
+ @source = nil
+ @version = nil
+ end
+
+ ##
+ # The name and version of the specification.
+ #
+ # Unlike Gem::Specification#full_name, the platform is not included.
+
+ def full_name
+ "#{@name}-#{@version}"
+ end
+
+end
+