Class: Monolith::RepositoryFinder

Inherits:
Object
  • Object
show all
Includes:
Finder
Defined in:
lib/monolith/repository_finder.rb

Instance Method Summary collapse

Methods included from Finder

#find_by_name, included

Constructor Details

#initialize(monolith) ⇒ RepositoryFinder

Returns a new instance of RepositoryFinder.



5
6
7
# File 'lib/monolith/repository_finder.rb', line 5

def initialize(monolith)
  @monolith = monolith
end

Instance Method Details

#allObject



9
10
11
12
13
14
# File 'lib/monolith/repository_finder.rb', line 9

def all
  @monolith.config.repositories.map do |(name, url)|
    path = File.expand_path(name, Dir.pwd)
    Repository.new(path, url)
  end
end