Class: Wee::RedirectResponse
- Inherits:
-
GenericResponse
- Object
- Rack::Response
- Response
- GenericResponse
- Wee::RedirectResponse
- Defined in:
- lib/wee/response.rb
Constant Summary collapse
- LOCATION_HEADER =
'Location'.freeze
Constants inherited from GenericResponse
GenericResponse::EXPIRES_HEADER, GenericResponse::EXPIRE_OFFSET
Instance Method Summary collapse
-
#initialize(location) ⇒ RedirectResponse
constructor
A new instance of RedirectResponse.
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 |