123456789_123456789_123456789_123456789_123456789_

Class: Rack::Response::Raw

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
self, Helpers
Inherits: Object
Defined in: lib/rack/response.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Helpers - Included

#add_header

Add a header that may have multiple values.

#cache!

Specify that the content should be cached.

#content_length, #delete_cookie,
#do_not_cache!

Specifies that the content shouldn’t be cached.

#include?, #media_type, #media_type_params, #set_cookie

Constructor Details

.new(status, headers) ⇒ Raw

[ GitHub ]

  
# File 'lib/rack/response.rb', line 381

def initialize(status, headers)
  @status = status
  @headers = headers
end

Instance Attribute Details

#headers (readonly)

[ GitHub ]

  
# File 'lib/rack/response.rb', line 378

attr_reader :headers

#status (rw)

[ GitHub ]

  
# File 'lib/rack/response.rb', line 379

attr_accessor :status

Instance Method Details

#delete_header(key)

[ GitHub ]

  
# File 'lib/rack/response.rb', line 398

def delete_header(key)
  headers.delete(key)
end

#get_header(key)

[ GitHub ]

  
# File 'lib/rack/response.rb', line 390

def get_header(key)
  headers[key]
end

#has_header?(key) ⇒ Boolean

[ GitHub ]

  
# File 'lib/rack/response.rb', line 386

def has_header?(key)
  headers.key?(key)
end

#set_header(key, value)

[ GitHub ]

  
# File 'lib/rack/response.rb', line 394

def set_header(key, value)
  headers[key] = value
end