Module: DaemonOgre::OPTS
Instance Method Summary collapse
- #err__path__ ⇒ Object
- #out__path__ ⇒ Object
- #pid ⇒ Object
- #pidfile=(pid_number) ⇒ Object
- #tmp_folder_path(obj = nil) ⇒ Object
Instance Method Details
#err__path__ ⇒ Object
31 32 33 |
# File 'lib/daemon-ogre/opts.rb', line 31 def err__path__ __temp__.path_for('err') end |
#out__path__ ⇒ Object
27 28 29 |
# File 'lib/daemon-ogre/opts.rb', line 27 def out__path__ __temp__.path_for('out') end |
#pid ⇒ Object
16 17 18 19 20 |
# File 'lib/daemon-ogre/opts.rb', line 16 def pid pid_number = nil __temp__.open('pid','r+'){|f| pid_number = f.read.chomp } return pid_number end |
#pidfile=(pid_number) ⇒ Object
22 23 24 |
# File 'lib/daemon-ogre/opts.rb', line 22 def pidfile=(pid_number) __temp__.open('pid','w'){|f| f.write(pid_number.to_s) } end |
#tmp_folder_path(obj = nil) ⇒ Object
9 10 11 12 13 |
# File 'lib/daemon-ogre/opts.rb', line 9 def tmp_folder_path(obj= nil) @path ||= nil @path = obj unless obj.nil? @path || __temp__.tmpdir end |