Class: Daemons::PidMem

Inherits:
Pid
  • Object
show all
Defined in:
lib/daemons/pidmem.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Pid

#cleanup, dir, #exist?, #initialize, #running?, running?

Constructor Details

This class inherits a constructor from Daemons::Pid

Instance Attribute Details

#pidObject

Returns the value of attribute pid.



7
8
9
# File 'lib/daemons/pidmem.rb', line 7

def pid
  @pid
end

Class Method Details

.existing(numeric_pid) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/daemons/pidmem.rb', line 9

def PidMem.existing(numeric_pid)
  new_instance = PidMem.allocate
  
  new_instance.instance_variable_set(:@pid, numeric_pid)
  
  return new_instance
end