Module: PIDCache

Includes:
CoreExt
Defined in:
lib/pid_cache.rb,
lib/pid_cache/version.rb

Defined Under Namespace

Modules: CoreExt

Constant Summary collapse

ORIGINAL_METHOD =
Process.method(:pid)
VERSION =
"0.1.0"

Class Method Summary collapse

Methods included from CoreExt

#_fork, #pid

Class Method Details

.pidObject



10
11
12
# File 'lib/pid_cache.rb', line 10

def pid
  @pid ||= ORIGINAL_METHOD.call
end

.resetObject



14
15
16
# File 'lib/pid_cache.rb', line 14

def reset
  @pid = nil
end