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

Refactor `CLI::Info`.

parent 66e9a060
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,20 @@ module Hbc
class CLI
class Info < 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 "Getting info for Cask #{cask_token}"
cask = CaskLoader.load(cask_token)
info(cask)
self.class.info(cask)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment