Class: Mutant::Result::ProcessStatus Private
- Inherits:
-
Object
- Object
- Mutant::Result::ProcessStatus
- Defined in:
- lib/mutant/result/process_status.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Serializable process status
Replaces Process::Status in the result tree with a round-trippable value object.
Constant Summary collapse
- JSON =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Transform::JSON.for_anima(self)
Class Method Summary collapse
-
.from_process_status(process_status) ⇒ ProcessStatus
private
Build from a Process::Status object.
Instance Method Summary collapse
-
#inspect ⇒ String
private
Stable inspect without memory address for use in user-facing output.
-
#success? ⇒ Boolean
private
Test for successful exit.
Class Method Details
.from_process_status(process_status) ⇒ ProcessStatus
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Build from a Process::Status object
17 18 19 |
# File 'lib/mutant/result/process_status.rb', line 17 def self.from_process_status(process_status) new(exitstatus: process_status.exitstatus) end |
Instance Method Details
#inspect ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Stable inspect without memory address for use in user-facing output
24 25 26 |
# File 'lib/mutant/result/process_status.rb', line 24 def inspect "#<#{self.class.name} exitstatus=#{exitstatus}>" end |
#success? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test for successful exit
31 32 33 |
# File 'lib/mutant/result/process_status.rb', line 31 def success? exitstatus.equal?(0) end |