aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-05-19 21:15:36 +0200
committerMarkus Reiter2017-05-22 02:51:16 +0200
commit5429ab0d1b7e6db39815d1c5826fc5757639c16c (patch)
tree2388100f4f1871ac607953e961f47d1d5d96cff2 /Library
parent101371207f8c6d4bd4da308f96c320232ba9c584 (diff)
downloadbrew-5429ab0d1b7e6db39815d1c5826fc5757639c16c.tar.bz2
Refactor `CLI::Version`.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/--version.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/--version.rb b/Library/Homebrew/cask/lib/hbc/cli/--version.rb
index bbc719c3b..253772ebe 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/--version.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/--version.rb
@@ -6,7 +6,11 @@ module Hbc
end
def self.run(*args)
- raise ArgumentError, "#{command_name} does not take arguments." unless args.empty?
+ new(*args).run
+ end
+
+ def run
+ raise ArgumentError, "#{self.class.command_name} does not take arguments." unless @args.empty?
puts Hbc.full_version
end