Class: Hbc::CLI::Zap

Inherits:
AbstractCommand show all
Defined in:
Library/Homebrew/cask/lib/hbc/cli/zap.rb

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractCommand

abstract?, command_name, needs_init?, run, visible

Methods included from Options

included, #process_arguments

Constructor Details

#initializeZap

Returns a new instance of Zap



6
7
8
9
# File 'Library/Homebrew/cask/lib/hbc/cli/zap.rb', line 6

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

Class Method Details

.helpObject



18
19
20
# File 'Library/Homebrew/cask/lib/hbc/cli/zap.rb', line 18

def self.help
  "zaps all files associated with the given Cask"
end

Instance Method Details

#runObject



11
12
13
14
15
16
# File 'Library/Homebrew/cask/lib/hbc/cli/zap.rb', line 11

def run
  casks.each do |cask|
    odebug "Zapping Cask #{cask}"
    Installer.new(cask, verbose: verbose?, force: force?).zap
  end
end