Sha256: 18b929ea8bf85949d3e9005d231e39b6b3f98f4d26f1452935ced797f0ac3a6b

Contents?: true

Size: 556 Bytes

Versions: 6

Compression:

Stored size: 556 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 "-v" => :version
    def version
    	say "<%= config[:gem_class] %> " + VERSION
    end
    
    desc "-h, [help]", "Show this message."
    def help task = nil
      say and super
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gemsmith-2.0.0 lib/gemsmith/templates/lib/gem/cli.rb.tmp
gemsmith-1.5.0 lib/gemsmith/templates/lib/gem/cli.rb.tmp
gemsmith-1.4.0 lib/gemsmith/templates/lib/gem/cli.rb.tmp
gemsmith-1.3.0 lib/gemsmith/templates/lib/gem/cli.rb.tmp
gemsmith-1.2.0 lib/gemsmith/templates/lib/gem/cli.rb.tmp
gemsmith-1.1.0 lib/gemsmith/templates/lib/gem/cli.rb.tmp