Class: EacRubyUtils::Envs::ExecutionResult
- Defined in:
- lib/eac_ruby_utils/envs/execution_result.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#r ⇒ Object
readonly
Returns the value of attribute r.
Instance Method Summary collapse
-
#initialize(result, options) ⇒ ExecutionResult
constructor
A new instance of ExecutionResult.
- #result ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(result, options) ⇒ ExecutionResult
Returns a new instance of ExecutionResult.
10 11 12 13 |
# File 'lib/eac_ruby_utils/envs/execution_result.rb', line 10 def initialize(result, ) @r = result @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/eac_ruby_utils/envs/execution_result.rb', line 8 def @options end |
#r ⇒ Object (readonly)
Returns the value of attribute r.
8 9 10 |
# File 'lib/eac_ruby_utils/envs/execution_result.rb', line 8 def r @r end |
Instance Method Details
#result ⇒ Object
15 16 17 18 19 20 |
# File 'lib/eac_ruby_utils/envs/execution_result.rb', line 15 def result return exit_code_zero_result if exit_code_zero? return expected_error_result if expected_error? raise ::EacRubyUtils::Envs::ExecutionError, 'Failed!' end |
#success? ⇒ Boolean
22 23 24 |
# File 'lib/eac_ruby_utils/envs/execution_result.rb', line 22 def success? exit_code_zero? || expected_error? end |