Class: SafeExec::StepResult
- Inherits:
-
Struct
- Object
- Struct
- SafeExec::StepResult
- Defined in:
- lib/stack-service-base/safe_exec.rb
Overview
Result of block execution via call_result.
Fields:
-
ok: true when the child block completed without raising
-
result: block return value, if execution succeeded
-
exception: reconstructed exception object, if any
-
timed_out: true when the child exceeded the deadline
Instance Attribute Summary collapse
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#ok ⇒ Object
Returns the value of attribute ok.
-
#result ⇒ Object
Returns the value of attribute result.
-
#timed_out ⇒ Object
Returns the value of attribute timed_out.
Instance Method Summary collapse
Instance Attribute Details
#exception ⇒ Object
Returns the value of attribute exception
24 25 26 |
# File 'lib/stack-service-base/safe_exec.rb', line 24 def exception @exception end |
#ok ⇒ Object
Returns the value of attribute ok
24 25 26 |
# File 'lib/stack-service-base/safe_exec.rb', line 24 def ok @ok end |
#result ⇒ Object
Returns the value of attribute result
24 25 26 |
# File 'lib/stack-service-base/safe_exec.rb', line 24 def result @result end |
#timed_out ⇒ Object
Returns the value of attribute timed_out
24 25 26 |
# File 'lib/stack-service-base/safe_exec.rb', line 24 def timed_out @timed_out end |
Instance Method Details
#success? ⇒ Boolean
25 |
# File 'lib/stack-service-base/safe_exec.rb', line 25 def success? = ok && !timed_out && exception.nil? |
#timed_out? ⇒ Boolean
26 |
# File 'lib/stack-service-base/safe_exec.rb', line 26 def timed_out? = !!timed_out |