Class: DockerClone

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ DockerClone

Returns a new instance of DockerClone.

Raises:

  • (ArgumentError)


11
12
13
14
15
16
# File 'lib/docker_clone.rb', line 11

def initialize(options = {})
  raise ArgumentError.new("No Config File Path Given.") if !options[:config_file_path]
  @config_file_path = full_path(options[:config_file_path])
  @working_dir = options[:working_dir] || DEFAULT_WORKING_DIR
  get_config
end

Instance Method Details

#clone_reposObject



18
19
20
21
22
23
24
# File 'lib/docker_clone.rb', line 18

def clone_repos
  Dir.chdir(@working_dir) do
    @docker_clone_config["repos"].each do |repo|
      clone_repo(repo)
    end
  end
end