Class: Assistor::PidFile
- Inherits:
-
Object
- Object
- Assistor::PidFile
- Defined in:
- lib/assistor/pid_file.rb
Instance Method Summary collapse
- #create(pid) ⇒ Object
- #delete ⇒ Object
- #exist? ⇒ Boolean
-
#initialize(pid_file) ⇒ PidFile
constructor
A new instance of PidFile.
Constructor Details
#initialize(pid_file) ⇒ PidFile
Returns a new instance of PidFile.
3 4 5 |
# File 'lib/assistor/pid_file.rb', line 3 def initialize(pid_file) @pid_file = pid_file end |
Instance Method Details
#create(pid) ⇒ Object
7 8 9 |
# File 'lib/assistor/pid_file.rb', line 7 def create(pid) File.write @pid_file, pid end |
#delete ⇒ Object
11 12 13 |
# File 'lib/assistor/pid_file.rb', line 11 def delete File.delete @pid_file end |
#exist? ⇒ Boolean
15 16 17 |
# File 'lib/assistor/pid_file.rb', line 15 def exist? File.exist? @pid_file end |