Skip to content
Snippets Groups Projects
Commit 811f4c5f authored by Markus Reiter's avatar Markus Reiter
Browse files

Refactor `CLI::Zap`.

parent 5429ab0d
Branches
Tags
No related merge requests found
......@@ -2,9 +2,16 @@ module Hbc
class CLI
class Zap < Base
def self.run(*args)
cask_tokens = cask_tokens_from(args)
raise CaskUnspecifiedError if cask_tokens.empty?
cask_tokens.each do |cask_token|
new(*args).run
end
def initialize(*args)
@cask_tokens = self.class.cask_tokens_from(args)
raise CaskUnspecifiedError if @cask_tokens.empty?
end
def run
@cask_tokens.each do |cask_token|
odebug "Zapping Cask #{cask_token}"
cask = CaskLoader.load(cask_token)
Installer.new(cask).zap
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment