Class: Lab42::Config::Values

Inherits:
Object
  • Object
show all
Extended by:
Forwarder
Defined in:
lib/lab42/config/class_level_config.rb

Instance Method Summary collapse

Instance Method Details

#get_with_context(key, rcv) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/lab42/config/class_level_config.rb', line 15

def get_with_context key, rcv
  val = fetch( key ){ raise NoMethodError, "undefined method `#{key}'" }
  if Lazy === val
    rcv.instance_exec &val
  else
    val
  end
end