Sha256: 50e0f645e2306921e49ccb7b486f6a0e9ff0dd54e48bf2918497ee6dcae2d346
Contents?: true
Size: 441 Bytes
Versions: 34
Compression:
Stored size: 441 Bytes
Contents
# Thor with subcommands that work correctly with help class SubCommandBase < Thor # Set the subcommand banner def self.banner(command, namespace = nil, subcommand = false) "#{basename} #{subcommand_prefix} #{command.usage}" end # Set the subcommand prefix 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 end
Version data entries
34 entries across 34 versions & 1 rubygems