Class: Librarian::Resolver::Implementation::MultiSource
- Inherits:
-
Object
- Object
- Librarian::Resolver::Implementation::MultiSource
- Defined in:
- lib/librarian/resolver/implementation.rb
Instance Attribute Summary collapse
-
#sources ⇒ Object
Returns the value of attribute sources.
Instance Method Summary collapse
-
#initialize(sources) ⇒ MultiSource
constructor
A new instance of MultiSource.
- #manifests(name) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(sources) ⇒ MultiSource
Returns a new instance of MultiSource.
12 13 14 |
# File 'lib/librarian/resolver/implementation.rb', line 12 def initialize(sources) self.sources = sources end |
Instance Attribute Details
#sources ⇒ Object
Returns the value of attribute sources.
11 12 13 |
# File 'lib/librarian/resolver/implementation.rb', line 11 def sources @sources end |
Instance Method Details
#manifests(name) ⇒ Object
15 16 17 |
# File 'lib/librarian/resolver/implementation.rb', line 15 def manifests(name) sources.reverse.map{|source| source.manifests(name)}.flatten(1).compact end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/librarian/resolver/implementation.rb', line 18 def to_s "(no source specified)" end |