From 5429ab0d1b7e6db39815d1c5826fc5757639c16c Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 19 May 2017 21:15:36 +0200 Subject: [PATCH] Refactor `CLI::Version`. --- Library/Homebrew/cask/lib/hbc/cli/--version.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/lib/hbc/cli/--version.rb b/Library/Homebrew/cask/lib/hbc/cli/--version.rb index bbc719c3b6..253772ebe9 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