Sha256: c8e5c19a05fff0953eb9e26bb6072172ed33330b30e6e2c70c85f3ac07bbcf8f

Contents?: true

Size: 432 Bytes

Versions: 8

Compression:

Stored size: 432 Bytes

Contents

module Ixtlan
  module Core
    class ConfigurationRack
      def initialize(app)
        @app = app
      end
      
      def call(env)
        model = Rails.application.config.configuration_model
        # configure all registered components with current config
        model.instance.fire_on_change if model
        result = @app.call(env)
        model.clear_instance if model
        result
      end
      
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ixtlan-core-0.6.1 lib/ixtlan/core/configuration_rack.rb
ixtlan-core-0.6.0 lib/ixtlan/core/configuration_rack.rb
ixtlan-core-0.5.0 lib/ixtlan/core/configuration_rack.rb
ixtlan-core-0.4.1 lib/ixtlan/core/configuration_rack.rb
ixtlan-core-0.4.0 lib/ixtlan/core/configuration_rack.rb
ixtlan-core-0.2.0 lib/ixtlan/core/configuration_rack.rb
ixtlan-core-0.1.1 lib/ixtlan/core/configuration_rack.rb
ixtlan-core-0.1.0 lib/ixtlan/core/configuration_rack.rb