Class: Namira::Middleware::Responder
- Inherits:
-
Object
- Object
- Namira::Middleware::Responder
- Defined in:
- lib/namira/middleware/responder.rb
Overview
Builds the Response from the backend responses
Instance Method Summary collapse
-
#call(env) ⇒ Object
Called by the middleware runner.
-
#initialize(app) ⇒ Responder
constructor
A new instance of Responder.
Constructor Details
#initialize(app) ⇒ Responder
Returns a new instance of Responder.
6 7 8 |
# File 'lib/namira/middleware/responder.rb', line 6 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
Called by the middleware runner.
14 15 16 17 18 |
# File 'lib/namira/middleware/responder.rb', line 14 def call(env) handle_response(env.response) env.response = Namira::Response.new(env.response) @app.call(env) end |