Class: Invisible::Reloader
- Inherits:
-
Object
- Object
- Invisible::Reloader
- Defined in:
- lib/invisible/reloader.rb
Overview
Middleware to reload the app on each request
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, reloadable) ⇒ Reloader
constructor
A new instance of Reloader.
Constructor Details
#initialize(app, reloadable) ⇒ Reloader
Returns a new instance of Reloader.
13 14 15 |
# File 'lib/invisible/reloader.rb', line 13 def initialize(app, reloadable) @app, @reloadable = app, reloadable end |
Instance Method Details
#call(env) ⇒ Object
17 18 19 20 |
# File 'lib/invisible/reloader.rb', line 17 def call(env) @reloadable.reload! @app.call(env) end |