Sha256: 6e03b3d4c5212736b5986cf61a22fef7517fdfbdeffafc537801257281164276

Contents?: true

Size: 582 Bytes

Versions: 3

Compression:

Stored size: 582 Bytes

Contents

require "shelly"
require "thor"
require "thor/thor"
require "thor/group"
require "thor/options"
require "thor/arguments"

module Shelly
  module CLI
    class Command < Thor
      include Helpers
      class_option :debug, :type => :boolean, :desc => "Show debug information"
      class_option :help, :type => :boolean, :aliases => "-h", :desc => "Describe available tasks or one specific task"

      def initialize(*)
        super
        if options[:help]
          help(self.class.send(:retrieve_task_name, ARGV.dup))
          exit(0)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shelly-0.1.25 lib/shelly/cli/command.rb
shelly-0.1.24 lib/shelly/cli/command.rb
shelly-0.1.24.pre lib/shelly/cli/command.rb