26 lines
482 B
Ruby
Raw Normal View History

2016-09-24 13:52:43 +02:00
module Hbc
class CLI
class Base
def self.command_name
@command_name ||= name.sub(%r{^.*:}, "").gsub(%r{(.)([A-Z])}, '\1_\2').downcase
end
2016-08-18 22:11:42 +03:00
2016-09-24 13:52:43 +02:00
def self.visible
true
end
2016-08-18 22:11:42 +03:00
2016-09-24 13:52:43 +02:00
def self.cask_tokens_from(args)
args.reject { |a| a.empty? || a.chars.first == "-" }
end
2016-08-18 22:11:42 +03:00
2016-09-24 13:52:43 +02:00
def self.help
"No help available for the #{command_name} command"
end
2016-08-18 22:11:42 +03:00
2016-09-24 13:52:43 +02:00
def self.needs_init?
false
end
end
2016-08-18 22:11:42 +03:00
end
end