Class: Wee::RedirectResponse
- Inherits:
-
GenericResponse
- Object
- Response
- GenericResponse
- Wee::RedirectResponse
- Defined in:
- lib/wee/response.rb
Constant Summary
Constants inherited from GenericResponse
GenericResponse::EXPIRE_OFFSET
Constants inherited from Response
Instance Attribute Summary
Attributes inherited from Response
Instance Method Summary collapse
-
#initialize(location) ⇒ RedirectResponse
constructor
A new instance of RedirectResponse.
Methods inherited from Response
#<<, #content_type, #content_type=, #cookies, #cookies?
Constructor Details
#initialize(location) ⇒ RedirectResponse
Returns a new instance of RedirectResponse.
50 51 52 53 54 |
# File 'lib/wee/response.rb', line 50 def initialize(location) super('text/html', %[<title>302 - Redirect</title><h1>302 - Redirect</h1><p>You are being redirected to <a href="#{location}">#{location}</a>]) @status = 302 @header['Location'] = location end |