Class: EasyConf::AppConfig
- Inherits:
-
Object
- Object
- EasyConf::AppConfig
show all
- Defined in:
- lib/easy_conf/app_config.rb
Overview
Instance Method Summary
collapse
Constructor Details
4
5
6
|
# File 'lib/easy_conf/app_config.rb', line 4
def initialize
@dict = {}
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/easy_conf/app_config.rb', line 8
def method_missing(meth, *args, &block)
define_singleton_method(meth) do
@dict[meth]
end
@dict[meth] = LookupVisitor.visit(meth)
end
|
Instance Method Details
#__keys ⇒ Object
16
17
18
|
# File 'lib/easy_conf/app_config.rb', line 16
def __keys
@dict.keys
end
|
#__to_hash ⇒ Object
20
21
22
|
# File 'lib/easy_conf/app_config.rb', line 20
def __to_hash
@dict.dup
end
|