Class: Wee::RefreshResponse
- Inherits:
-
GenericResponse
- Object
- Response
- GenericResponse
- Wee::RefreshResponse
- 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(message, location, seconds = 10) ⇒ RefreshResponse
constructor
A new instance of RefreshResponse.
Methods inherited from Response
#<<, #content_type, #content_type=, #cookies, #cookies?
Constructor Details
#initialize(message, location, seconds = 10) ⇒ RefreshResponse
Returns a new instance of RefreshResponse.
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/wee/response.rb', line 58 def initialize(, location, seconds=10) super('text/html', %[<html> <head> <meta http-equiv="REFRESH" content="#{seconds};URL=#{location}"> <title>#{message}</title> </head> <body> <h1>#{message}</h1> You are being redirected to <a href="#{location}">#{location}</a> </body> </html>]) end |