Class: DTask::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/dtask.rb

Overview

DTask configuration.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



14
# File 'lib/dtask.rb', line 14

def initialize; @table = Hash.new; end

Class Method Details

.method_missing(name, *args) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/dtask.rb', line 16

def self.method_missing(name, *args)
  if md = /(.+)=$/.match(name.to_s)
    instance.instance_eval { @table[name] = args.first }
  else
    instance.instance_eval { @table[name] }
  end
end