Class: Librarian::Resolver::Implementation
- Inherits:
-
Object
- Object
- Librarian::Resolver::Implementation
- Defined in:
- lib/librarian/resolver/implementation.rb
Defined Under Namespace
Classes: MultiSource
Instance Attribute Summary collapse
-
#resolver ⇒ Object
readonly
Returns the value of attribute resolver.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Instance Method Summary collapse
-
#initialize(resolver, spec) ⇒ Implementation
constructor
A new instance of Implementation.
- #resolve(manifests) ⇒ Object
Constructor Details
#initialize(resolver, spec) ⇒ Implementation
Returns a new instance of Implementation.
23 24 25 26 27 |
# File 'lib/librarian/resolver/implementation.rb', line 23 def initialize(resolver, spec) self.resolver = resolver self.spec = spec @level = 0 end |
Instance Attribute Details
#resolver ⇒ Object
Returns the value of attribute resolver.
20 21 22 |
# File 'lib/librarian/resolver/implementation.rb', line 20 def resolver @resolver end |
#spec ⇒ Object
Returns the value of attribute spec.
20 21 22 |
# File 'lib/librarian/resolver/implementation.rb', line 20 def spec @spec end |
Instance Method Details
#resolve(manifests) ⇒ Object
29 30 31 32 33 |
# File 'lib/librarian/resolver/implementation.rb', line 29 def resolve(manifests) manifests = index_by(manifests, &:name) if manifests.kind_of?(Array) addtl = spec.dependencies + sourced_dependencies_for_manifests(manifests) recursive_resolve([], manifests, [], addtl) end |