Sha256: 9f28667c8af66e2afffa30c800a9f4354138ce2d87b8a2d74d482ef6c333efd3

Contents?: true

Size: 603 Bytes

Versions: 94

Compression:

Stored size: 603 Bytes

Contents

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

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

94 entries across 94 versions & 1 rubygems

Version Path
shelly-0.4.33 lib/shelly/cli/command.rb
shelly-0.4.32 lib/shelly/cli/command.rb
shelly-0.4.31 lib/shelly/cli/command.rb
shelly-0.4.30 lib/shelly/cli/command.rb
shelly-0.4.29 lib/shelly/cli/command.rb
shelly-0.4.29.pre lib/shelly/cli/command.rb
shelly-0.4.28 lib/shelly/cli/command.rb
shelly-0.4.28.pre2 lib/shelly/cli/command.rb
shelly-0.4.28.pre lib/shelly/cli/command.rb
shelly-0.4.27 lib/shelly/cli/command.rb
shelly-0.4.26 lib/shelly/cli/command.rb
shelly-0.4.26.pre lib/shelly/cli/command.rb
shelly-0.4.25 lib/shelly/cli/command.rb
shelly-0.4.24 lib/shelly/cli/command.rb
shelly-0.4.23 lib/shelly/cli/command.rb
shelly-0.4.23.pre lib/shelly/cli/command.rb
shelly-0.4.22 lib/shelly/cli/command.rb
shelly-0.4.21 lib/shelly/cli/command.rb
shelly-0.4.19 lib/shelly/cli/command.rb
shelly-0.4.18 lib/shelly/cli/command.rb