Class: SmartMachine::Commands::GridCommands::SubThor
- Inherits:
-
Thor
- Object
- Thor
- SmartMachine::Commands::GridCommands::SubThor
show all
- Defined in:
- lib/smart_machine/commands/grid_commands/sub_thor.rb
Direct Known Subclasses
Elasticsearch, Emailer, Minio, Mysql, Nextcloud, Nginx, Phpmyadmin, Prereceiver, Redis, Roundcube, Terminal
Class Method Summary
collapse
Class Method Details
.banner(command, namespace = nil, subcommand = false) ⇒ Object
5
6
7
|
# File 'lib/smart_machine/commands/grid_commands/sub_thor.rb', line 5
def self.banner(command, namespace = nil, subcommand = false)
"#{basename} grid #{subcommand_prefix} #{command.usage}"
end
|
.subcommand_prefix ⇒ Object
9
10
11
|
# File 'lib/smart_machine/commands/grid_commands/sub_thor.rb', line 9
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
|