Class: Gem::Molinillo::Resolver
- Inherits:
- 
      Object
      
        - Object
- Gem::Molinillo::Resolver
 
- Defined in:
- lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb,
 lib/rubygems/vendor/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
Defined Under Namespace
Classes: Resolution
Instance Attribute Summary collapse
- 
  
    
      #resolver_ui  ⇒ UI 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The UI module used to communicate back to the user during the resolution process. 
- 
  
    
      #specification_provider  ⇒ SpecificationProvider 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The specification provider used in the resolution process. 
Instance Method Summary collapse
- 
  
    
      #initialize(specification_provider, resolver_ui)  ⇒ Resolver 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initializes a new resolver. 
- 
  
    
      #resolve(requested, base = DependencyGraph.new)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Resolves the requested dependencies into a DependencyGraph, locking to the base dependency graph (if specified). 
Constructor Details
#initialize(specification_provider, resolver_ui) ⇒ Resolver
Initializes a new resolver.
| 27 28 29 30 | # File 'lib/rubygems/vendor/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)
Returns the UI module used to communicate back to the user during the resolution process.
| 20 21 22 | # File 'lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb', line 20 def resolver_ui @resolver_ui end | 
#specification_provider ⇒ SpecificationProvider (readonly)
Returns the specification provider used in the resolution process.
| 16 17 18 | # File 'lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb', line 16 def specification_provider @specification_provider end | 
Instance Method Details
#resolve(requested, base = DependencyGraph.new) ⇒ Object
Resolves the requested dependencies into a DependencyGraph, locking to the base dependency graph (if specified)
| 38 39 40 41 42 43 44 | # File 'lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb', line 38 def resolve(requested, base = DependencyGraph.new) Resolution.new(specification_provider, resolver_ui, requested, base). resolve end |