Class: Pidfile
Class Method Summary collapse
Class Method Details
.delete ⇒ Object
13 |
# File 'lib/audible/pidfile.rb', line 13 def delete; rm path; end |
.exists? ⇒ Boolean
12 |
# File 'lib/audible/pidfile.rb', line 12 def exists?; File.exists? path; end |
.missing? ⇒ Boolean
11 |
# File 'lib/audible/pidfile.rb', line 11 def missing?; false == exists? end |
.new(pid = $$) ⇒ Object
5 6 7 8 9 |
# File 'lib/audible/pidfile.rb', line 5 def new(pid=$$) File.open path, "w" do |f| f.puts pid end end |
.path ⇒ Object
14 |
# File 'lib/audible/pidfile.rb', line 14 def path; File.join ".", ".pid"; end |