Class: Cask::Cmd::Cache

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

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractCommand

abstract?, 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

#initializeCache

Returns a new instance of Cache



12
13
14
15
# File 'brew/Library/Homebrew/cask/cmd/--cache.rb', line 12

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

Class Method Details

.command_nameObject



8
9
10
# File 'brew/Library/Homebrew/cask/cmd/--cache.rb', line 8

def self.command_name
  "--cache"
end

.helpObject



23
24
25
# File 'brew/Library/Homebrew/cask/cmd/--cache.rb', line 23

def self.help
  "display the file used to cache the Cask"
end

Instance Method Details

#runObject



17
18
19
20
21
# File 'brew/Library/Homebrew/cask/cmd/--cache.rb', line 17

def run
  casks.each do |cask|
    puts Download.new(cask).downloader.cached_location
  end
end