Class: Cask::Cmd::Cache Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Implementation of the brew cask --cache command.

Constant Summary

Constants inherited from AbstractCommand

AbstractCommand::OPTIONS

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractCommand

abstract?, banner_args, banner_headline, help, #initialize, max_named, parser, run, short_description, visible?

Methods included from Homebrew::Search

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

Constructor Details

This class inherits a constructor from Cask::Cmd::AbstractCommand

Class Method Details

.cached_location(cask) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


28
29
30
31
32
# File 'Library/Homebrew/cask/cmd/--cache.rb', line 28

def self.cached_location(cask)
  require "cask/download"

  Download.new(cask).downloader.cached_location
end

.command_nameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


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

def self.command_name
  "--cache"
end

.descriptionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


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

def self.description
  "Display the file used to cache a <cask>."
end

.min_namedObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/cmd/--cache.rb', line 10

def self.min_named
  :cask
end

Instance Method Details

#runObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


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

def run
  casks.each do |cask|
    puts self.class.cached_location(cask)
  end
end