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.
194 195 196 |
# File 'lib/adhearsion/component_manager.rb', line 194 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
198 199 200 201 202 |
# File 'lib/adhearsion/component_manager.rb', line 198 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 |