class Pidfile

Public Class Methods

delete() click to toggle source
# File lib/audible/pidfile.rb, line 13
def delete; rm path; end
exists?() click to toggle source
# File lib/audible/pidfile.rb, line 12
def exists?; File.exists? path; end
missing?() click to toggle source
# File lib/audible/pidfile.rb, line 11
def missing?; false == exists? end
new(pid=$$) click to toggle source
# File lib/audible/pidfile.rb, line 5
def new(pid=$$)
  File.open path, "w" do |f|
    f.puts pid
  end
end
path() click to toggle source
# File lib/audible/pidfile.rb, line 14
def path; File.join ".", ".pid"; end