method

new

rails latest stable - Class: ActionDispatch::Response
new(status = 200, headers = nil, body = [])
public

No documentation available.

# 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