Class: Locomotive::API::Middlewares::LoggerMiddleware
- Inherits:
-
Object
- Object
- Locomotive::API::Middlewares::LoggerMiddleware
- Defined in:
- app/api/locomotive/api/middlewares/logger_middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ LoggerMiddleware
constructor
A new instance of LoggerMiddleware.
Constructor Details
#initialize(app) ⇒ LoggerMiddleware
Returns a new instance of LoggerMiddleware.
7 8 9 |
# File 'app/api/locomotive/api/middlewares/logger_middleware.rb', line 7 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 |
# File 'app/api/locomotive/api/middlewares/logger_middleware.rb', line 11 def call(env) @app.call(env).tap do |response| (response, env) end end |