class RailsEventStore::Middleware
Public Class Methods
Source
# File lib/rails_event_store/middleware.rb, line 5 def initialize(app) @app = app end
Public Instance Methods
Source
# File lib/rails_event_store/middleware.rb, line 9 def call(env) if config.respond_to?(:event_store) config.event_store.with_request_metadata(env) { @app.call(env) } else @app.call(env) end end
Private Instance Methods
Source
# File lib/rails_event_store/middleware.rb, line 19 def config Rails.application.config end