Class: EasyConf::AppConfig
- Inherits:
-
Object
- Object
- EasyConf::AppConfig
- Defined in:
- lib/easy_conf/app_config.rb
Overview
:nodoc
Instance Method Summary collapse
- #__keys ⇒ Object
- #__to_hash ⇒ Object
-
#initialize ⇒ AppConfig
constructor
A new instance of AppConfig.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize ⇒ AppConfig
Returns a new instance of AppConfig.
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 |