Class: Gojira::Command::Base

Inherits:
Thor
  • Object
show all
Defined in:
lib/gojira/command/base.rb

Direct Known Subclasses

Cluster, Env

Class Method Summary collapse

Class Method Details



6
7
8
# File 'lib/gojira/command/base.rb', line 6

def self.banner(command, _namespace = nil, _subcommand = false)
  "#{basename} #{subcommand_prefix} #{command.usage}"
end

.subcommand_prefixObject



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