postrank-labs/goliath — Issue #139: Lazy config load
Author: fonzo14
Created: 2012-01-20 11:27:34+00:00
State: open

Not an issue but a feature request / proposal.

Would it not be nice to lazy load some configuration settings ?

Example :

config['mysql'] = lazy do
....
end

lazy would be a very simple method :

def lazy(&blk)
blk
end

And then at first call, it would call the proc and init the setting.

What do you think about it ? It would be an easy way to share config ...

Thx