Class: GrapeDeviseAuth::Middleware

Inherits:
Object
  • Object
show all
Defined in:
lib/grape_devise_auth/middleware.rb

Instance Method Summary collapse

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