aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-05-19 21:55:41 +0200
committerMarkus Reiter2017-05-22 02:51:16 +0200
commit1f5828c72de87ce87df31fad1c1046a6bcf4a994 (patch)
tree9cdd3edb3e5dab5513780304f2a8aa8cf32199a2 /Library
parent276adc9e8b0071e6c61160b93e7bd399fe4f29e4 (diff)
downloadbrew-1f5828c72de87ce87df31fad1c1046a6bcf4a994.tar.bz2
Refactor `CLI::Fetch`.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/fetch.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/fetch.rb b/Library/Homebrew/cask/lib/hbc/cli/fetch.rb
index 83dba672c..f7139ff63 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/fetch.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/fetch.rb
@@ -2,9 +2,13 @@ module Hbc
class CLI
class Fetch < Base
def self.run(*args)
- cask_tokens = cask_tokens_from(args)
+ new(*args).run
+ end
+
+ def run
+ cask_tokens = self.class.cask_tokens_from(@args)
raise CaskUnspecifiedError if cask_tokens.empty?
- force = args.include? "--force"
+ force = @args.include? "--force"
cask_tokens.each do |cask_token|
ohai "Downloading external files for Cask #{cask_token}"