Class: Exeggutor::ProcessResult
- Inherits:
-
Object
- Object
- Exeggutor::ProcessResult
- Defined in:
- lib/exeggutor.rb
Overview
Represents the result of a process execution.
Instance Attribute Summary collapse
-
#exit_code ⇒ Integer
readonly
The exit code of the process.
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#stderr ⇒ String
readonly
The standard error of the process.
-
#stdout ⇒ String
readonly
The standard output of the process.
Instance Method Summary collapse
-
#initialize(stdout:, stderr:, exit_code:, pid:) ⇒ ProcessResult
constructor
A new instance of ProcessResult.
-
#success? ⇒ Boolean
Checks if the process was successful.
Constructor Details
#initialize(stdout:, stderr:, exit_code:, pid:) ⇒ ProcessResult
Returns a new instance of ProcessResult.
107 108 109 110 111 112 |
# File 'lib/exeggutor.rb', line 107 def initialize(stdout:, stderr:, exit_code:, pid:) @stdout = stdout @stderr = stderr @exit_code = exit_code @pid = pid end |
Instance Attribute Details
#exit_code ⇒ Integer (readonly)
The exit code of the process.
103 104 105 |
# File 'lib/exeggutor.rb', line 103 def exit_code @exit_code end |
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
104 105 106 |
# File 'lib/exeggutor.rb', line 104 def pid @pid end |
#stderr ⇒ String (readonly)
The standard error of the process.
103 104 105 |
# File 'lib/exeggutor.rb', line 103 def stderr @stderr end |
#stdout ⇒ String (readonly)
The standard output of the process.
103 104 105 |
# File 'lib/exeggutor.rb', line 103 def stdout @stdout end |
Instance Method Details
#success? ⇒ Boolean
Checks if the process was successful.
117 118 119 |
# File 'lib/exeggutor.rb', line 117 def success? exit_code == 0 end |