Class: Daemoned::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/sweat_shop/daemoned.rb

Constant Summary collapse

METHODS =
[:script_path]
CONFIG =
{}

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/sweat_shop/daemoned.rb', line 16

def method_missing(name, *args)
  name = name.to_s.upcase.to_sym
  if name.to_s =~ /^(.*)=$/
    name = $1.to_sym
    CONFIG[name] = args.first
  else
    CONFIG[name]
  end
end