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
- .new(status, headers) ⇒ Raw constructor
Instance Attribute Summary
Helpers
- Included
#accepted?, #bad_request?, #cache_control, #cache_control=, #client_error?, | |
#content_type | Get the content type of the response. |
#content_type= | Set the content type of the response. |
#created?, #etag, #etag=, #forbidden?, #informational?, #invalid?, #location, #location=, #method_not_allowed?, #moved_permanently?, #no_content?, #not_acceptable?, #not_found?, #ok?, #precondition_failed?, #redirect?, #redirection?, #request_timeout?, #server_error?, #set_cookie_header, #set_cookie_header=, #successful?, #unauthorized?, #unprocessable? |
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
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
# 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