blob: e709f41914a298f099702e3c6c46b55124db00d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  | 
module Hbc
  class CLI
    class Zap < AbstractCommand
      option "--force", :force, false
      def initialize(*)
        super
        raise CaskUnspecifiedError if args.empty?
      end
      def run
        raise CaskError, "Zap incomplete." if zap_casks == :incomplete
      end
      def zap_casks
        casks.each do |cask|
          odebug "Zapping Cask #{cask}"
          Installer.new(cask, verbose: verbose?, force: force?).zap
        end
      end
      def self.help
        "zaps all files associated with the given Cask"
      end
    end
  end
end
  |