Class: RailsConfig::Rack::Reloader
- Inherits:
-
Object
- Object
- RailsConfig::Rack::Reloader
- Defined in:
- lib/rails_config/rack/reloader.rb
Overview
Rack middleware the reloads RailsConfig on every request (only use in dev mode)
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.
5 6 7 |
# File 'lib/rails_config/rack/reloader.rb', line 5 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 |
# File 'lib/rails_config/rack/reloader.rb', line 9 def call(env) RailsConfig.reload! @app.call(env) end |