Class: Process::Status

Inherits:
Object show all
Defined in:
opal/stdlib/nodejs/kernel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, pid) ⇒ Status

Returns a new instance of Status.



47
48
49
# File 'opal/stdlib/nodejs/kernel.rb', line 47

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

Instance Attribute Details

#pidObject (readonly)

Returns the value of attribute pid.



55
56
57
# File 'opal/stdlib/nodejs/kernel.rb', line 55

def pid
  @pid
end

Instance Method Details

#exitstatusObject



51
52
53
# File 'opal/stdlib/nodejs/kernel.rb', line 51

def exitstatus
  @status
end

#inspectObject



61
62
63
# File 'opal/stdlib/nodejs/kernel.rb', line 61

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

#success?Boolean

Returns:



57
58
59
# File 'opal/stdlib/nodejs/kernel.rb', line 57

def success?
  @status == 0
end