class method
self.new
Ruby on Rails 7.1.6
Since v3.1.12Signature
self.new(status = 200, headers = nil, body = [])
No documentation comment.
Parameters
-
statusopt = 200 -
headersopt = nil -
bodyopt = []
Source
# File actionpack/lib/action_dispatch/http/response.rb, line 169
def initialize(status = 200, headers = nil, body = [])
super()
@headers = Headers.new
headers&.each do |key, value|
@headers[key] = value
end
self.body, self.status = body, status
@cv = new_cond
@committed = false
@sending = false
@sent = false
prepare_cache_control!
yield self if block_given?
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 169
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response