homebrew-cask-versions/lib/cask/cli/base.rb
Roland Walker b7573b3838 create abstract Cask::CLI::Base
from which all commands inherit.  Add `visible` method
for future use.
2014-06-20 15:06:29 -04:00

13 lines
259 B
Ruby

class Cask::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.help
"No help available for the #{command_name} command"
end
end