Class: MagicLinks::Middleware::MagicTokenRedirect

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

Defined Under Namespace

Classes: Handler

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ MagicTokenRedirect

Returns a new instance of MagicTokenRedirect.



4
5
6
# File 'lib/magic_links/middleware/magic_token_redirect.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
# File 'lib/magic_links/middleware/magic_token_redirect.rb', line 8

def call(env)
  Handler.new(env).handle || app.call(env)
end