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.
259 260 261 |
# File 'lib/adhearsion/component_manager.rb', line 259 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
263 264 265 266 267 |
# File 'lib/adhearsion/component_manager.rb', line 263 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 |