Class: Wee::RedirectResponse

Inherits:
Response show all
Defined in:
lib/wee/response.rb

Constant Summary collapse

LOCATION_HEADER =
'Location'.freeze

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ RedirectResponse

Returns a new instance of RedirectResponse.



23
24
25
26
27
# File 'lib/wee/response.rb', line 23

def initialize(location)
  super(['<title>302 - Redirect</title><h1>302 - Redirect</h1>',
         '<p>You are being redirected to <a href="', location, '">', 
         location, '</a>'], 302, LOCATION_HEADER => location)
end