Class: Process::Status

Inherits:
Object show all
Defined in:
opal/opal/corelib/process/status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, pid) ⇒ Status

Returns a new instance of Status.



3
4
5
# File 'opal/opal/corelib/process/status.rb', line 3

def initialize(status, pid)
  @status, @pid = status, pid
end

Instance Attribute Details

#pidObject (readonly)

Returns the value of attribute pid.



11
12
13
# File 'opal/opal/corelib/process/status.rb', line 11

def pid
  @pid
end

Instance Method Details

#exitstatusObject



7
8
9
# File 'opal/opal/corelib/process/status.rb', line 7

def exitstatus
  @status
end

#inspectObject



17
18
19
# File 'opal/opal/corelib/process/status.rb', line 17

def inspect
  "#<Process::Status: pid #{@pid} exit #{@status}>"
end

#success?Boolean

Returns:



13
14
15
# File 'opal/opal/corelib/process/status.rb', line 13

def success?
  @status == 0
end