Class: GrapeDeviseAuth::Middleware
- Inherits:
-
Object
- Object
- GrapeDeviseAuth::Middleware
- Defined in:
- lib/grape_devise_auth/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, resource_name) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app, resource_name) ⇒ Middleware
Returns a new instance of Middleware.
4 5 6 7 |
# File 'lib/grape_devise_auth/middleware.rb', line 4 def initialize(app, resource_name) @app = app @resource_name = resource_name end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 |
# File 'lib/grape_devise_auth/middleware.rb', line 9 def call(env) setup(env) responses_with_headers(*@app.call(env)) end |