Class: Lab42::Config::ClassLevelConfig
- Inherits:
-
BasicObject
- Defined in:
- lib/lab42/config/class_level_config.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &blk) ⇒ Object
38
39
40
41
42
|
# File 'lib/lab42/config/class_level_config.rb', line 38
def method_missing name, *args, &blk
super if args.size > 1 || ( args.empty? && blk.! )
__values__[ name ] = args.first || Lazy.new( blk )
end
|
Instance Method Details
#instance_level_config(rcv) ⇒ Object
32
33
34
|
# File 'lib/lab42/config/class_level_config.rb', line 32
def instance_level_config rcv
InstanceLevelConfig.new __values__, rcv
end
|