Class: Praxis::BootloaderStages::PluginConfigLoad
- Defined in:
- lib/praxis/bootloader_stages/plugin_config_load.rb
Instance Attribute Summary
Attributes inherited from Stage
#after_callbacks, #before_callbacks, #context, #name, #stages
Instance Method Summary collapse
Methods inherited from Stage
#after, #application, #before, #callback_args, #execute_callbacks, #initialize, #run, #setup!, #setup_deferred_callbacks!
Constructor Details
This class inherits a constructor from Praxis::Stage
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/praxis/bootloader_stages/plugin_config_load.rb', line 6 def execute application.plugins.each do |config_key, plugin| context = [plugin.class.name] value = plugin.load_config! object = plugin.config_attribute.load(value, context) application.config.send("#{config_key}=", object) if object plugin.config = application.config.send(config_key.to_s) end end |