Class: Rack::Response::Raw
- Inherits:
-
Object
- Object
- Rack::Response::Raw
- Includes:
- Helpers
- Defined in:
- lib/rack/response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #delete_header(key) ⇒ Object
- #get_header(key) ⇒ Object
- #has_header?(key) ⇒ Boolean
-
#initialize(status, headers) ⇒ Raw
constructor
A new instance of Raw.
- #set_header(key, value) ⇒ Object
Methods included from Helpers
#accepted?, #add_header, #bad_request?, #cache!, #cache_control, #cache_control=, #client_error?, #content_length, #content_type, #content_type=, #created?, #delete_cookie, #do_not_cache!, #etag, #etag=, #forbidden?, #include?, #informational?, #invalid?, #location, #location=, #media_type, #media_type_params, #method_not_allowed?, #moved_permanently?, #no_content?, #not_acceptable?, #not_found?, #ok?, #precondition_failed?, #redirect?, #redirection?, #request_timeout?, #server_error?, #set_cookie, #set_cookie_header, #set_cookie_header=, #successful?, #unauthorized?, #unprocessable?
Constructor Details
#initialize(status, headers) ⇒ Raw
Returns a new instance of Raw.
381 382 383 384 |
# File 'lib/rack/response.rb', line 381 def initialize(status, headers) @status = status @headers = headers end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
378 379 380 |
# File 'lib/rack/response.rb', line 378 def headers @headers end |
#status ⇒ Object
Returns the value of attribute status.
379 380 381 |
# File 'lib/rack/response.rb', line 379 def status @status end |
Instance Method Details
#delete_header(key) ⇒ Object
398 399 400 |
# File 'lib/rack/response.rb', line 398 def delete_header(key) headers.delete(key) end |
#get_header(key) ⇒ Object
390 391 392 |
# File 'lib/rack/response.rb', line 390 def get_header(key) headers[key] end |
#has_header?(key) ⇒ Boolean
386 387 388 |
# File 'lib/rack/response.rb', line 386 def has_header?(key) headers.key?(key) end |
#set_header(key, value) ⇒ Object
394 395 396 |
# File 'lib/rack/response.rb', line 394 def set_header(key, value) headers[key] = value end |