Class: Reel::Request::Info
- Inherits:
-
Object
- Object
- Reel::Request::Info
- Defined in:
- lib/reel/request/info.rb
Constant Summary collapse
- CASE_INSENSITVE_HASH =
Hash.new do |hash, key| hash[hash.keys.find {|k| k =~ /#{key}/i}] if key end
- UPGRADE =
'Upgrade'.freeze
- WEBSOCKET =
'websocket'.freeze
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#http_method ⇒ Object
readonly
Returns the value of attribute http_method.
-
#http_version ⇒ Object
readonly
Returns the value of attribute http_version.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(http_method, url, http_version, headers) ⇒ Info
constructor
A new instance of Info.
- #websocket_request? ⇒ Boolean
Constructor Details
#initialize(http_method, url, http_version, headers) ⇒ Info
Returns a new instance of Info.
11 12 13 14 15 16 |
# File 'lib/reel/request/info.rb', line 11 def initialize(http_method, url, http_version, headers) @http_method = http_method @url = url @http_version = http_version @headers = CASE_INSENSITVE_HASH.merge headers end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
9 10 11 |
# File 'lib/reel/request/info.rb', line 9 def headers @headers end |
#http_method ⇒ Object (readonly)
Returns the value of attribute http_method.
9 10 11 |
# File 'lib/reel/request/info.rb', line 9 def http_method @http_method end |
#http_version ⇒ Object (readonly)
Returns the value of attribute http_version.
9 10 11 |
# File 'lib/reel/request/info.rb', line 9 def http_version @http_version end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
9 10 11 |
# File 'lib/reel/request/info.rb', line 9 def url @url end |