Class: Aperitiiif::CLI::SubCommandBase
- Inherits:
-
Thor
- Object
- Thor
- Aperitiiif::CLI::SubCommandBase
- Defined in:
- lib/aperitiiif/cli.rb
Overview
TO DO COMMENT
Direct Known Subclasses
Class Method Summary collapse
Class Method Details
.banner(command, _namespace, _subcommand) ⇒ Object
9 10 11 |
# File 'lib/aperitiiif/cli.rb', line 9 def self.(command, _namespace, _subcommand) "#{basename} #{subcommand_prefix} #{command.usage}" end |
.subcommand_prefix ⇒ Object
13 14 15 16 17 18 |
# File 'lib/aperitiiif/cli.rb', line 13 def self.subcommand_prefix str = name.gsub(/.*::/, '') str.gsub!(/^[A-Z]/) { |match| match[0].downcase } str.gsub!(/[A-Z]/) { |match| "-#{match[0].downcase}" } str end |