Class: GitMulticast::Cloner

Inherits:
Object
  • Object
show all
Defined in:
lib/git_multicast/cloner.rb

Instance Method Summary collapse

Constructor Details

#initialize(username, dir) ⇒ Cloner



6
7
8
9
# File 'lib/git_multicast/cloner.rb', line 6

def initialize(username, dir)
  @username = username
  @dir = dir
end

Instance Method Details

#clone!Object



11
12
13
14
15
16
17
18
19
# File 'lib/git_multicast/cloner.rb', line 11

def clone!
  repos = RepositoryFetcher.get_all_repos_from_user(username)

  tasks = repos.map do |repo|
    Task.new(repo.name, command(repo))
  end

  TaskRunner.new(tasks).run!
end