Class: Parklife::Responder::Redirect

Inherits:
Base
  • Object
show all
Defined in:
lib/parklife/responder/redirect.rb

Instance Attribute Summary

Attributes inherited from Base

#crawler

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Parklife::Responder::Base

Instance Method Details

#call(route, response) ⇒ Object

Raises:



7
8
9
10
11
12
13
# File 'lib/parklife/responder/redirect.rb', line 7

def call(route, response)
  raise HTTPRedirectError.new(
    response.status,
    crawler.browser.uri_for(route.path),
    response.headers['location']
  )
end