Class: Ask::Sandbox::Result
- Inherits:
-
Data
- Object
- Data
- Ask::Sandbox::Result
- Defined in:
- lib/ask/sandbox/base.rb
Overview
Structured result from a sandbox command execution.
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
-
#timed_out ⇒ Object
readonly
Returns the value of attribute timed_out.
Instance Method Summary collapse
-
#success? ⇒ Boolean
True if the command exited successfully (exit code 0).
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code
31 32 33 34 35 36 |
# File 'lib/ask/sandbox/base.rb', line 31 Result = Data.define(:stdout, :stderr, :exit_code, :timed_out) do # @return [Boolean] true if the command exited successfully (exit code 0) def success? exit_code == 0 end end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr
31 32 33 34 35 36 |
# File 'lib/ask/sandbox/base.rb', line 31 Result = Data.define(:stdout, :stderr, :exit_code, :timed_out) do # @return [Boolean] true if the command exited successfully (exit code 0) def success? exit_code == 0 end end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout
31 32 33 34 35 36 |
# File 'lib/ask/sandbox/base.rb', line 31 Result = Data.define(:stdout, :stderr, :exit_code, :timed_out) do # @return [Boolean] true if the command exited successfully (exit code 0) def success? exit_code == 0 end end |
#timed_out ⇒ Object (readonly)
Returns the value of attribute timed_out
31 32 33 34 35 36 |
# File 'lib/ask/sandbox/base.rb', line 31 Result = Data.define(:stdout, :stderr, :exit_code, :timed_out) do # @return [Boolean] true if the command exited successfully (exit code 0) def success? exit_code == 0 end end |
Instance Method Details
#success? ⇒ Boolean
Returns true if the command exited successfully (exit code 0).
33 34 35 |
# File 'lib/ask/sandbox/base.rb', line 33 def success? exit_code == 0 end |