Method: But::SubCommandBase.subcommand_prefix
- Defined in:
- lib/but/cli.rb
.subcommand_prefix ⇒ Object
11 12 13 |
# File 'lib/but/cli.rb', line 11 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 |