Sha256: 0b4a61a75007ada89fc9422a6da79f56e66fe8f953bbc5ff69759fae0a24d739

Contents?: true

Size: 654 Bytes

Versions: 17

Compression:

Stored size: 654 Bytes

Contents

require "shelly"
require "thor"
require "thor/thor"
require "thor/group"
require "thor/options"
require "thor/arguments"
require "thor/basic"
require "shelly/cli/errors"

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
        check_for_home
        if options[:help]
          help(self.class.send(:retrieve_task_name, ARGV.dup))
          exit(0)
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
shelly-0.5.7 lib/shelly/cli/command.rb
shelly-0.5.6 lib/shelly/cli/command.rb
shelly-0.5.5 lib/shelly/cli/command.rb
shelly-0.5.4 lib/shelly/cli/command.rb
shelly-0.5.3 lib/shelly/cli/command.rb
shelly-0.5.2 lib/shelly/cli/command.rb
shelly-0.5.1 lib/shelly/cli/command.rb
shelly-0.5.0 lib/shelly/cli/command.rb
shelly-0.4.42 lib/shelly/cli/command.rb
shelly-0.4.41 lib/shelly/cli/command.rb
shelly-0.4.40 lib/shelly/cli/command.rb
shelly-0.4.39 lib/shelly/cli/command.rb
shelly-0.4.38 lib/shelly/cli/command.rb
shelly-0.4.37 lib/shelly/cli/command.rb
shelly-0.4.36 lib/shelly/cli/command.rb
shelly-0.4.35 lib/shelly/cli/command.rb
shelly-0.4.34 lib/shelly/cli/command.rb