Sha256: 6661bb2c5387aac3f1c7fe61f2f7e5c1a6030d207eba15647308bf92f8838b0e
Contents?: true
Size: 512 Bytes
Versions: 28
Compression:
Stored size: 512 Bytes
Contents
require 'thor' require_relative 'prompt_helper' module Libis module Format module Cli class SubCommand < Thor include PromptHelper def self.banner(command, namespace = nil, subcommand = false) "#{basename} #{subcommand_prefix} #{command.usage}" end 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 end end end
Version data entries
28 entries across 28 versions & 1 rubygems