Sha256: 1299abd0fe4e4e59f32bdb88c334500451ba6bc2aa3985a9847c12dac46008cd

Contents?: true

Size: 614 Bytes

Versions: 13

Compression:

Stored size: 614 Bytes

Contents

# encoding: utf-8

module CLAide
  # Including this module into an exception class will ensure that when raised,
  # while running {Command.run}, only the message of the exception will be
  # shown to the user. Unless disabled with the `--verbose` flag.
  #
  # In addition, the message will be colored red, if {Command.ansi_output}
  # is set to `true`.
  #
  module InformativeError
    # @return [Numeric] The exist status code that should be used to terminate
    #         the program with. Defaults to `1`.
    #
    attr_accessor :exit_status

    def exit_status
      @exit_status ||= 1
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
claide-1.0.1 lib/claide/informative_error.rb
claide-1.0.0 lib/claide/informative_error.rb
claide-1.0.0.rc.1 lib/claide/informative_error.rb
claide-1.0.0.beta.3 lib/claide/informative_error.rb
claide-1.0.0.beta.2 lib/claide/informative_error.rb
claide-1.0.0.beta.1 lib/claide/informative_error.rb
claide-0.9.1 lib/claide/informative_error.rb
claide-0.9.0 lib/claide/informative_error.rb
claide-0.8.2 lib/claide/informative_error.rb
claide-0.8.1 lib/claide/informative_error.rb
claide-0.8.0 lib/claide/informative_error.rb
claide-0.7.0 lib/claide/informative_error.rb
claide-0.6.1 lib/claide/informative_error.rb