Class: RubstApi::RedirectResponse
- Defined in:
- lib/rubst_api/responses.rb
Instance Attribute Summary
Attributes inherited from Response
#body, #headers, #media_type, #status_code
Instance Method Summary collapse
-
#initialize(url, status_code: 307, headers: {}) ⇒ RedirectResponse
constructor
A new instance of RedirectResponse.
Methods inherited from Response
#delete_cookie, #finish, #render, #set_cookie
Constructor Details
#initialize(url, status_code: 307, headers: {}) ⇒ RedirectResponse
Returns a new instance of RedirectResponse.
40 41 42 |
# File 'lib/rubst_api/responses.rb', line 40 def initialize(url, status_code: 307, headers: {}, **) super("", status_code:, headers: headers.merge("location" => url)) end |