Class: Mutant::Result::ProcessStatus Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

Parameters:

  • process_status (Process::Status)

Returns:



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

#inspectString

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

Returns:

  • (String)


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

Returns:

  • (Boolean)


31
32
33
# File 'lib/mutant/result/process_status.rb', line 31

def success?
  exitstatus.equal?(0)
end