Class: Cliqr::Executor::ExitCode Private

Inherits:
Object
  • Object
show all
Defined in:
lib/cliqr/executor/runner.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Exit code mapper based on error type

Class Method Summary collapse

Class Method Details

.code(type) ⇒ Integer

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Get exit code based on type

Returns:

  • (Integer)


67
68
69
70
71
# File 'lib/cliqr/executor/runner.rb', line 67

def self.code(type)
  return 0 if type == :success
  return type.class.error_code if type.class.respond_to?(:error_code)
  99
end