Class: SafeExec::CommandResult
- Inherits:
-
Struct
- Object
- Struct
- SafeExec::CommandResult
- Defined in:
- lib/stack-service-base/safe_exec.rb
Overview
Result of external command execution via capture.
Fields:
-
stdout: collected standard output
-
stderr: collected standard error
-
status: Process::Status for completed commands
-
timed_out: true when the process group was terminated on deadline
-
exception: wrapper-level error, typically spawn/setup failure
Instance Attribute Summary collapse
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#status ⇒ Object
Returns the value of attribute status.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
-
#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
37 38 39 |
# File 'lib/stack-service-base/safe_exec.rb', line 37 def exception @exception end |
#status ⇒ Object
Returns the value of attribute status
37 38 39 |
# File 'lib/stack-service-base/safe_exec.rb', line 37 def status @status end |
#stderr ⇒ Object
Returns the value of attribute stderr
37 38 39 |
# File 'lib/stack-service-base/safe_exec.rb', line 37 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout
37 38 39 |
# File 'lib/stack-service-base/safe_exec.rb', line 37 def stdout @stdout end |
#timed_out ⇒ Object
Returns the value of attribute timed_out
37 38 39 |
# File 'lib/stack-service-base/safe_exec.rb', line 37 def timed_out @timed_out end |
Instance Method Details
#err ⇒ Object
42 |
# File 'lib/stack-service-base/safe_exec.rb', line 42 def err = stderr |
#exitstatus ⇒ Object
40 |
# File 'lib/stack-service-base/safe_exec.rb', line 40 def exitstatus = status&.exitstatus |
#out ⇒ Object
41 |
# File 'lib/stack-service-base/safe_exec.rb', line 41 def out = stdout |
#success? ⇒ Boolean
38 |
# File 'lib/stack-service-base/safe_exec.rb', line 38 def success? = !timed_out && exception.nil? && status&.success? |
#timed_out? ⇒ Boolean
39 |
# File 'lib/stack-service-base/safe_exec.rb', line 39 def timed_out? = !!timed_out |