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.
-
#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:) ⇒ ProcessResult
constructor
A new instance of ProcessResult.
-
#success? ⇒ Boolean
Checks if the process was successful.
Constructor Details
#initialize(stdout:, stderr:, exit_code:) ⇒ ProcessResult
Returns a new instance of ProcessResult.
14 15 16 17 18 |
# File 'lib/exeggutor.rb', line 14 def initialize(stdout:, stderr:, exit_code:) @stdout = stdout @stderr = stderr @exit_code = exit_code end |
Instance Attribute Details
#exit_code ⇒ Integer (readonly)
The exit code of the process.
10 11 12 |
# File 'lib/exeggutor.rb', line 10 def exit_code @exit_code end |
#stderr ⇒ String (readonly)
The standard error of the process.
10 11 12 |
# File 'lib/exeggutor.rb', line 10 def stderr @stderr end |
#stdout ⇒ String (readonly)
The standard output of the process.
10 11 12 |
# File 'lib/exeggutor.rb', line 10 def stdout @stdout end |
Instance Method Details
#success? ⇒ Boolean
Checks if the process was successful.
23 24 25 |
# File 'lib/exeggutor.rb', line 23 def success? exit_code == 0 end |