Class: Cask::Cmd::Fetch

Inherits:
AbstractCommand show all
Defined in:
brew/Library/Homebrew/cask/cmd/fetch.rb

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractCommand

abstract?, command_name, run, visible

Methods included from Homebrew::Search

#query_regexp, #search_casks, #search_descriptions, #search_formulae, #search_taps

Methods included from Options

#process_arguments

Constructor Details

#initializeFetch

Returns a new instance of Fetch



10
11
12
13
# File 'brew/Library/Homebrew/cask/cmd/fetch.rb', line 10

def initialize(*)
  super
  raise CaskUnspecifiedError if args.empty?
end

Class Method Details

.helpObject



25
26
27
# File 'brew/Library/Homebrew/cask/cmd/fetch.rb', line 25

def self.help
  "downloads remote application files to local cache"
end

Instance Method Details

#runObject



15
16
17
18
19
20
21
22
23
# File 'brew/Library/Homebrew/cask/cmd/fetch.rb', line 15

def run
  casks.each do |cask|
    puts Installer.caveats(cask)
    ohai "Downloading external files for Cask #{cask}"
    downloaded_path = Download.new(cask, force: force?, quarantine: quarantine?).perform
    Verify.all(cask, downloaded_path)
    ohai "Success! Downloaded to -> #{downloaded_path}"
  end
end