Module: DaemonOgre::OPTS

Defined in:
lib/daemon-ogre/opts.rb

Class Method Summary collapse

Class Method Details

.method_missing(method_name, *args) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/daemon-ogre/opts.rb', line 20

def method_missing method_name, *args

  @@tmp_dsl ||= ::TMP.new( self.tmp_folder_path )

  if method_name.to_s.reverse[0] == "="
    @@tmp_dsl.__send__ method_name,args[0]
  else
    @@tmp_dsl.__send__ method_name
  end

end

.pid(*args) ⇒ Object



12
13
14
# File 'lib/daemon-ogre/opts.rb', line 12

def pid *args
  self.pidfile
end

.pid=(*args) ⇒ Object



16
17
18
# File 'lib/daemon-ogre/opts.rb', line 16

def pid= *args
  self.pidfile= *args
end

.tmp_folder_path(obj = nil) ⇒ Object



6
7
8
9
10
# File 'lib/daemon-ogre/opts.rb', line 6

def tmp_folder_path obj= nil
  @@path  ||= nil
  @@path    = obj unless obj.nil?
  @@path  ||  "#{::TMP.folder_path.to_s}_daemon"
end