Class: Response::Redirect
- Includes:
- AbstractType
- Defined in:
- lib/response/redirect.rb
Overview
Abstract redirect response
Defined Under Namespace
Constant Summary
Constants inherited from Response
Instance Attribute Summary
Attributes inherited from Response
Class Method Summary collapse
-
.build(location) ⇒ Response::Redirect
Build redirect response.
Methods inherited from Response
#cache_control, #content_type, #last_modified, #merge_headers, #rack_array, #to_rack_response, #valid?, #with_body, #with_headers, #with_status
Class Method Details
.build(location) ⇒ Response::Redirect
Build redirect response
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/response/redirect.rb', line 37 def self.build(location) super( self::STATUS, { 'Location' => location, 'Content-Type' => TEXT_PLAIN }, "You are beeing redirected to: #{location}" ) end |