Class: RailsDevelopmentBoost::Async::Middleware
- Inherits:
-
Object
- Object
- RailsDevelopmentBoost::Async::Middleware
- Defined in:
- lib/rails_development_boost/async.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
6 7 8 |
# File 'lib/rails_development_boost/async.rb', line 6 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rails_development_boost/async.rb', line 10 def call(env) if DependenciesPatch.applied? && DependenciesPatch.async? Async.synchronize { @app.call(env) } else @app.call(env) end end |