Sha256: 48555562887a7ae9b9bb05d73da29d8e3e2e91b06646bf992de57ab6750bd7d1
Contents?: true
Size: 455 Bytes
Versions: 1
Compression:
Stored size: 455 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-1.0.0 | lib/warden/redirect.rb |