Class: SubCommandBase

Inherits:
Thor
  • Object
show all
Defined in:
lib/cnvrg/data.rb

Class Method Summary collapse

Class Method Details



4
5
6
# File 'lib/cnvrg/data.rb', line 4

def self.banner(command, namespace = nil, subcommand = false)
 "#{basename}  #{command.usage}"
end

.subcommand_prefixObject



8
9
10
# File 'lib/cnvrg/data.rb', line 8

def self.subcommand_prefix
 self.name.gsub(%r{.*::}, '').gsub(%r{^[A-Z]}) { |match| match[0].downcase }.gsub(%r{[A-Z]}) { |match| "-#{match[0].downcase}" }
end