Sha256: 29f8b7b359d66709627f571798230325db4c1d4b19506184279c3b3154021a75
Contents?: true
Size: 449 Bytes
Versions: 1
Compression:
Stored size: 449 Bytes
Contents
module Warden class Redirect < Array def initialize(location,status=302,headers={}) redirect_headers = headers.merge({ "Content-Type" => "text/html", "Location" => location }) body = "<html><body>You are being redirected to <a href='#{location}'>#{location}</a></body></html>" super [status,redirect_headers,[body]] end def status; self[0]; end def headers; self[1]; end def body; self[2]; end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
warden-redirect-0.0.1 | lib/warden/redirect.rb |