Method: Xmvc::Config::ConfigBlock#initialize
- Defined in:
- lib/xmvc/config.rb
#initialize(klass, &block) ⇒ ConfigBlock
Evaluates the provided block, where any call to a method causes #[]= to be called on klass with the method name as the key and the arguments as the value.
Parameters
- klass<Object~[]=>
-
The object on which to assign values.
- &block
-
The block which specifies the config values to set.
Returns
nil
:api: private
175 176 177 178 |
# File 'lib/xmvc/config.rb', line 175 def initialize(klass, &block) @klass = klass instance_eval(&block) end |