diff options
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli/base.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/base.rb | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/base.rb b/Library/Homebrew/cask/lib/hbc/cli/base.rb index af03969af..6c706d537 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/base.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/base.rb @@ -1,21 +1,25 @@ -class Hbc::CLI::Base - def self.command_name - @command_name ||= name.sub(%r{^.*:}, "").gsub(%r{(.)([A-Z])}, '\1_\2').downcase - end +module Hbc + class CLI + class Base + def self.command_name + @command_name ||= name.sub(%r{^.*:}, "").gsub(%r{(.)([A-Z])}, '\1_\2').downcase + end - def self.visible - true - end + def self.visible + true + end - def self.cask_tokens_from(args) - args.reject { |a| a.empty? || a.chars.first == "-" } - end + def self.cask_tokens_from(args) + args.reject { |a| a.empty? || a.chars.first == "-" } + end - def self.help - "No help available for the #{command_name} command" - end + def self.help + "No help available for the #{command_name} command" + end - def self.needs_init? - false + def self.needs_init? + false + end + end end end |
