Class: Librarian::Resolver::Implementation::MultiSource

Inherits:
Object
  • Object
show all
Defined in:
lib/librarian/resolver/implementation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#sourcesObject

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_sObject



18
19
20
# File 'lib/librarian/resolver/implementation.rb', line 18

def to_s
  "(no source specified)"
end