Class: Config::Rack::Reloader

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

Overview

Rack middleware the reloads Config on every request (only use in dev mode)

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Reloader

Returns a new instance of Reloader.



5
6
7
# File 'lib/config/rack/reloader.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
# File 'lib/config/rack/reloader.rb', line 9

def call(env)
  Config.reload!
  @app.call(env)
end