Class: Adhearsion::Components::ComponentManager::LazyConfigLoader
- Defined in:
- lib/adhearsion/component_manager.rb
Instance Method Summary collapse
-
#initialize(component_manager) ⇒ LazyConfigLoader
constructor
A new instance of LazyConfigLoader.
- #method_missing(component_name) ⇒ Object
Constructor Details
#initialize(component_manager) ⇒ LazyConfigLoader
Returns a new instance of LazyConfigLoader.
195 196 197 |
# File 'lib/adhearsion/component_manager.rb', line 195 def initialize(component_manager) @component_manager = component_manager end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(component_name) ⇒ Object
199 200 201 202 203 |
# File 'lib/adhearsion/component_manager.rb', line 199 def method_missing(component_name) config = @component_manager.configuration_for_component_named(component_name.to_s) (class << self; self; end).send(:define_method, component_name) { config } config end |