Sha256: 76f58b94970f3d6ace5320a07d15d52ae26cca0bad0eb31d1060331be4f8b448

Contents?: true

Size: 631 Bytes

Versions: 11

Compression:

Stored size: 631 Bytes

Contents

require "yaml"
require "thor"
require "thor/actions"
require "thor_plus/actions"

module <%= config[:gem_class] %>
  class CLI < Thor
  	include Thor::Actions
  	include ThorPlus::Actions

    # Initialize.
    def initialize args = [], options = {}, config = {}
      super args, options, config
    end

    desc "-v, [--version]", "Show version."
    map %w(-v --version) => :version
    def version
      say "<%= config[:gem_class] %> " + VERSION
    end

    desc "-h, [--help=HELP]", "Show this message or get help for a command."
    map %w(-h --help) => :help
    def help task = nil
      say and super
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gemsmith-5.0.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-4.3.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-4.2.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-4.1.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-4.0.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-3.2.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-3.1.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-3.0.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-2.4.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-2.3.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt
gemsmith-2.2.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/cli.rb.tt