Module: DaemonOgre::OPTS

Extended by:
OPTS
Included in:
OPTS
Defined in:
lib/daemon-ogre/opts.rb

Instance Method Summary collapse

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

#pidObject



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