Class: Invisible::Reloader

Inherits:
Object
  • Object
show all
Defined in:
lib/invisible/reloader.rb

Overview

Middleware to reload the app on each request

Instance Method Summary collapse

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