Sha256: 629d5328059939e23db7fce92701bbe2c98d80b2491841548866e44f90d78c80

Contents?: true

Size: 751 Bytes

Versions: 1

Compression:

Stored size: 751 Bytes

Contents

require 'thor'
require 'thor/group'
require 'thor/actions'

module Gator
  class Runner < Thor
    include Thor::Actions

    def self.start
      Gator::Util.initialize_files
      super
    end

    desc "version", "Show Gator version"
    def version
      say "Gator --pre"
    end

    #The following lines fixes a bug in thor see: https://github.com/wycats/thor/pull/150
    class << self
      def register(klass, subcommand_name, usage, description, options={})
        if klass <= Thor::Group
          desc usage, description, options
          define_method(subcommand_name) { |*args| invoke klass }
        else
          desc usage, description, options
          subcommand subcommand_name, klass
        end
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gator-0.0.12.pre lib/gator/runner.rb