aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
authorMarkus Reiter2017-05-19 22:01:50 +0200
committerMarkus Reiter2017-05-22 02:51:16 +0200
commit276adc9e8b0071e6c61160b93e7bd399fe4f29e4 (patch)
tree896f9f68e0e45756f1722f51a1bad477f5ada815 /Library/Homebrew/cask/lib
parent8248345a9a735aa9ee0421413166e9733bff277d (diff)
downloadbrew-276adc9e8b0071e6c61160b93e7bd399fe4f29e4.tar.bz2
Refactor `CLI::Edit`.
Diffstat (limited to 'Library/Homebrew/cask/lib')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/edit.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/edit.rb b/Library/Homebrew/cask/lib/hbc/cli/edit.rb
index 1f1e0d918..52b089a8b 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/edit.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/edit.rb
@@ -2,7 +2,11 @@ module Hbc
class CLI
class Edit < 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?
# only respects the first argument
cask_token = cask_tokens.first.sub(/\.rb$/i, "")