Class: Gojira::Command::Base
- Inherits:
-
Thor
- Object
- Thor
- Gojira::Command::Base
- Defined in:
- lib/gojira/command/base.rb
Class Method Summary collapse
Class Method Details
.banner(command, _namespace = nil, _subcommand = false) ⇒ Object
6 7 8 |
# File 'lib/gojira/command/base.rb', line 6 def self.(command, _namespace = nil, _subcommand = false) "#{basename} #{subcommand_prefix} #{command.usage}" end |
.subcommand_prefix ⇒ Object
10 11 12 |
# File 'lib/gojira/command/base.rb', line 10 def self.subcommand_prefix name.split('::').last.gsub(/([A-Z]+)([A-Z][a-z])/, '\1-\2').gsub(/([a-z\d])([A-Z])/, '\1-\2').downcase end |