Sha256: c25c030ed6248b1b7df124323bfab1c3babfb36e041e22a689196a63c30db141

Contents?: true

Size: 612 Bytes

Versions: 5

Compression:

Stored size: 612 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_writer :exit_status

    def exit_status
      @exit_status ||= 1
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
claide-1.1.0 lib/claide/informative_error.rb
claide-1.0.3 lib/claide/informative_error.rb
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/claide-1.0.2/lib/claide/informative_error.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/claide-1.0.2/lib/claide/informative_error.rb
claide-1.0.2 lib/claide/informative_error.rb