Method: ActionDispatch::Response#to_a
- Defined in:
- actionpack/lib/action_dispatch/http/response.rb
#to_a ⇒ Object Also known as: prepare!
Turns the Response into a Rack-compatible array of the status, headers, and body. Allows explicit splatting:
status, headers, body = *response
410 411 412 413 |
# File 'actionpack/lib/action_dispatch/http/response.rb', line 410 def to_a commit! rack_response @status, @headers.to_hash end |