Class: RailsMultitenant::Middleware::IsolatedContextRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_multitenant/middleware/isolated_context_registry.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ IsolatedContextRegistry

Returns a new instance of IsolatedContextRegistry.



6
7
8
# File 'lib/rails_multitenant/middleware/isolated_context_registry.rb', line 6

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
# File 'lib/rails_multitenant/middleware/isolated_context_registry.rb', line 10

def call(env)
  GlobalContextRegistry.with_isolated_registry do
    @app.call(env)
  end
end