Class: Gem::Resolver::State
- Inherits:
-
Struct
- Object
- Struct
- Gem::Resolver::State
- Defined in:
- lib/rubygems/resolver.rb
Overview
Contains the state for attempting activation of a set of possible specs. needed is a Gem::List of DependencyRequest objects that, well, need to be satisfied. specs is the List of ActivationRequest that are being tested. dep is the DependencyRequest that was used to generate this state. spec is the Specification for this state. possible is List of DependencyRequest objects that can be tried to find a complete set. conflicts is a [DependencyRequest, Conflict] hit tried to activate the state.
Instance Attribute Summary collapse
-
#conflicts ⇒ Object
Returns the value of attribute conflicts.
-
#dep ⇒ Object
Returns the value of attribute dep.
-
#needed ⇒ Object
Returns the value of attribute needed.
-
#possibles ⇒ Object
Returns the value of attribute possibles.
-
#spec ⇒ Object
Returns the value of attribute spec.
-
#specs ⇒ Object
Returns the value of attribute specs.
Instance Method Summary collapse
-
#summary ⇒ Object
:nodoc:.
Instance Attribute Details
#conflicts ⇒ Object
Returns the value of attribute conflicts
265 266 267 |
# File 'lib/rubygems/resolver.rb', line 265 def conflicts @conflicts end |
#dep ⇒ Object
Returns the value of attribute dep
265 266 267 |
# File 'lib/rubygems/resolver.rb', line 265 def dep @dep end |
#needed ⇒ Object
Returns the value of attribute needed
265 266 267 |
# File 'lib/rubygems/resolver.rb', line 265 def needed @needed end |
#possibles ⇒ Object
Returns the value of attribute possibles
265 266 267 |
# File 'lib/rubygems/resolver.rb', line 265 def possibles @possibles end |
#spec ⇒ Object
Returns the value of attribute spec
265 266 267 |
# File 'lib/rubygems/resolver.rb', line 265 def spec @spec end |
#specs ⇒ Object
Returns the value of attribute specs
265 266 267 |
# File 'lib/rubygems/resolver.rb', line 265 def specs @specs end |
Instance Method Details
#summary ⇒ Object
:nodoc:
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/rubygems/resolver.rb', line 266 def summary # :nodoc: nd = needed.map { |s| s.to_s }.sort if nd if specs then ss = specs.map { |s| s.full_name }.sort ss.unshift ss.length end d = dep.to_s d << " from #{dep.requester.full_name}" if dep.requester ps = possibles.map { |p| p.full_name }.sort ps.unshift ps.length cs = conflicts.map do |(s, c)| [s.full_name, c.conflicting_dependencies.map { |cd| cd.to_s }] end { :needed => nd, :specs => ss, :dep => d, :spec => spec.full_name, :possibles => ps, :conflicts => cs } end |