Class: Pod::Src::Downloader

Inherits:
Object
  • Object
show all
Defined in:
lib/pod/src/downloader.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Downloader

Returns a new instance of Downloader.



6
7
8
# File 'lib/pod/src/downloader.rb', line 6

def initialize(context)
  @context = context
end

Instance Method Details

#downloadObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/pod/src/downloader.rb', line 10

def download
  specs.each do |spec|
    next if spec.source.nil? || spec.source[:git].nil?

    source_url = spec.source[:git]

    if use_ghq?
      download_by_ghq(source_url)
    else
      target_path = target_dir.join(spec.name)
      next if target_path.exist?
      download_by_pod_downloader(target_path, source_url)
    end
  end
end