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 367

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

Instance Attribute Details

#headers (readonly)

[ GitHub ]

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

attr_reader :headers

#status (rw)

[ GitHub ]

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

attr_accessor :status

Instance Method Details

#delete_header(key)

[ GitHub ]

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

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

#get_header(key)

[ GitHub ]

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

def get_header(key)
  headers[key]
end

#has_header?(key) ⇒ Boolean

[ GitHub ]

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

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

#set_header(key, value)

[ GitHub ]

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

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