Class: HttpObjects::HeadersHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/http_objects/headers_hash.rb

Overview

Public: Hash with HTTP Headers methods.

Examples

headers = HttpObjects::Headers.new
headers["key"] = "value" # is kind of Hash

# And for HTTP headers, you have objects
headers["Content-Type"] = "text/html;Charset=utf-8"
headers.content_type? # => true
headers.content_type! # => "text/html;Charset=utf-8"
headers.content_type.value # => "text/html"
headers.content_type['charset'] # => "utf-8"
headers.content_type.inspect # => #<HttpObjects::Headers::MediaType ...>

Constant Summary

Constants inherited from Hash

HttpObjects::Hash::MethodCreator

Method Summary

Methods inherited from Hash

#[], #[]=, add_attribute, #initialize, new, #to_s

Methods included from HttpObjects::Headers::Attributes

#attributes, #register_attribute

Constructor Details

This class inherits a constructor from HttpObjects::Hash