Class: Jets::Controller::Middleware::Reloader
- Inherits:
-
Object
- Object
- Jets::Controller::Middleware::Reloader
- Defined in:
- lib/jets/controller/middleware/reloader.rb
Constant Summary collapse
- @@reload_lock =
Mutex.new
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Reloader
constructor
A new instance of Reloader.
Constructor Details
#initialize(app) ⇒ Reloader
Returns a new instance of Reloader.
3 4 5 |
# File 'lib/jets/controller/middleware/reloader.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/jets/controller/middleware/reloader.rb', line 8 def call(env) @@reload_lock.synchronize do Jets::Autoloaders.main.reload @app.call(env) end end |