Sha256: 1599bd65d3a7b8f840a2386932f71f43ff7e39bb029b5f29664b0cf867e732fb

Contents?: true

Size: 499 Bytes

Versions: 36

Compression:

Stored size: 499 Bytes

Contents

module Praxis
  module BootloaderStages
    class PluginConfigLoad < Stage

      def execute
        application.plugins.each do |config_key, plugin|
          context = [plugin.class.name]
          value = plugin.load_config!
          object = plugin.config_attribute.load(value, context)

          if object
            application.config.send("#{config_key}=", object)
          end

          plugin.config = application.config.send("#{config_key}")
        end
      end

    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
praxis-2.0.pre.18 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.17 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.16 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.15 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.14 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.13 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.12 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.11 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.10 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.9 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.8 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.7 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.6 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.5 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.4 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.3 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.2 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-2.0.pre.1 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-0.22.pre.2 lib/praxis/bootloader_stages/plugin_config_load.rb
praxis-0.22.pre.1 lib/praxis/bootloader_stages/plugin_config_load.rb