homebrew-cask-versions/lib/hbc/cli/base.rb
Roland Walker 202d6019f8 Move all code under an Hbc:: namespace
* convert existing Cask:: namespace to Hbc::
* move Homebrew-fork code under Hbc::
* move freestanding classes such as Tty and TopologicalHash under Hbc::
* recast HOMEBREW_CASK_ constants as HBC_
* modify our Homebrew Formula for backward compatibility
* devscripts and dev docs
2015-01-02 07:27:03 -05:00

17 lines
344 B
Ruby

class Hbc::CLI::Base
def self.command_name
@command_name ||= self.name.sub(%r{^.*:}, '').gsub(%r{(.)([A-Z])}, '\1_\2').downcase
end
def self.visible
true
end
def self.cask_tokens_from(args)
args.reject { |a| a.chars.first == '-' }
end
def self.help
"No help available for the #{command_name} command"
end
end