Sha256: 0d22de65448bf52d8148f7cc784209695ccf14de06d6ccac3decfd843f5781e5
Contents?: true
Size: 480 Bytes
Versions: 17
Compression:
Stored size: 480 Bytes
Contents
# frozen_string_literal: true # 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 name.gsub(/.*::/, '') .gsub(/^[A-Z]/) { |match| match[0].downcase } .gsub(/[A-Z]/) { |match| " #{match[0].downcase}" } end end
Version data entries
17 entries across 17 versions & 1 rubygems