Class: Buildr::ProcessStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/buildr/core/util.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid, success, exitstatus) ⇒ ProcessStatus

Returns a new instance of ProcessStatus.



300
301
302
303
304
305
306
307
# File 'lib/buildr/core/util.rb', line 300

def initialize(pid, success, exitstatus)
  @pid = pid
  @success = success
  @exitstatus = exitstatus

  @termsig = nil
  @stopsig = nil
end

Instance Attribute Details

#exitstatusObject (readonly)

Returns the value of attribute exitstatus.



298
299
300
# File 'lib/buildr/core/util.rb', line 298

def exitstatus
  @exitstatus
end

#pidObject (readonly)

Returns the value of attribute pid.



298
299
300
# File 'lib/buildr/core/util.rb', line 298

def pid
  @pid
end

#stopsigObject (readonly)

Returns the value of attribute stopsig.



298
299
300
# File 'lib/buildr/core/util.rb', line 298

def stopsig
  @stopsig
end

#termsigObject (readonly)

Returns the value of attribute termsig.



298
299
300
# File 'lib/buildr/core/util.rb', line 298

def termsig
  @termsig
end

Instance Method Details

#&(num) ⇒ Object



309
310
311
# File 'lib/buildr/core/util.rb', line 309

def &(num)
  pid & num
end

#==(other) ⇒ Object



313
314
315
# File 'lib/buildr/core/util.rb', line 313

def ==(other)
  pid == other.pid
end

#>>(num) ⇒ Object



317
318
319
# File 'lib/buildr/core/util.rb', line 317

def >>(num)
  pid >> num
end

#coredump?Boolean

Returns:

  • (Boolean)


321
322
323
# File 'lib/buildr/core/util.rb', line 321

def coredump?
  false
end

#exited?Boolean

Returns:

  • (Boolean)


325
326
327
# File 'lib/buildr/core/util.rb', line 325

def exited?
  true
end

#stopped?Boolean

Returns:

  • (Boolean)


329
330
331
# File 'lib/buildr/core/util.rb', line 329

def stopped?
  false
end

#success?Boolean

Returns:

  • (Boolean)


333
334
335
# File 'lib/buildr/core/util.rb', line 333

def success?
  @success
end

#to_iObject



337
338
339
# File 'lib/buildr/core/util.rb', line 337

def to_i
  pid
end

#to_intObject



341
342
343
# File 'lib/buildr/core/util.rb', line 341

def to_int
  pid
end

#to_sObject



345
346
347
# File 'lib/buildr/core/util.rb', line 345

def to_s
  pid.to_s
end