Class: Gem::Resolver::Molinillo::Resolver
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Inherits: | Object |
Defined in: | lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb, lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb |
Overview
This class encapsulates a dependency resolver. The resolver is responsible for determining which set of dependencies to activate, with feedback from the #specification_provider
Class Method Summary
-
.new(specification_provider, resolver_ui) ⇒ Resolver
constructor
Initializes a new resolver.
Instance Attribute Summary
- #resolver_ui ⇒ UI readonly
- #specification_provider ⇒ SpecificationProvider readonly
Instance Method Summary
-
#resolve(requested, base = DependencyGraph.new) ⇒ DependencyGraph
Resolves the requested dependencies into a
DependencyGraph
, locking to the base dependency graph (if specified).
Constructor Details
.new(specification_provider, resolver_ui) ⇒ Resolver
Initializes a new resolver.
# File 'lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb', line 27
def initialize(specification_provider, resolver_ui) @specification_provider = specification_provider @resolver_ui = resolver_ui end
Instance Attribute Details
#resolver_ui ⇒ UI (readonly)
# File 'lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb', line 20
attr_reader :resolver_ui
#specification_provider ⇒ SpecificationProvider (readonly)
# File 'lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb', line 16
attr_reader :specification_provider
Instance Method Details
#resolve(requested, base = DependencyGraph.new) ⇒ DependencyGraph
Resolves the requested dependencies into a DependencyGraph
, locking to the base dependency graph (if specified)
# File 'lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb', line 39
def resolve(requested, base = DependencyGraph.new) Resolution.new(specification_provider, resolver_ui, requested, base). resolve end