Class: WebSocket::HTTP::Response
- Inherits:
-
Object
- Object
- WebSocket::HTTP::Response
- Includes:
- Headers
- Defined in:
- lib/websocket/http/response.rb
Constant Summary collapse
- STATUS_LINE =
/^(HTTP\/[0-9]+\.[0-9]+) ([0-9]{3}) ([\x20-\x7e]+)$/
Constants included from Headers
Headers::CR, Headers::HEADER_LINE, Headers::LF, Headers::MAX_LINE_LENGTH
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Attributes included from Headers
Instance Method Summary collapse
Methods included from Headers
#complete?, #error?, #initialize, #parse
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/websocket/http/response.rb', line 9 def code @code end |
Instance Method Details
#[](name) ⇒ Object
11 12 13 |
# File 'lib/websocket/http/response.rb', line 11 def [](name) @headers[HTTP.normalize_header(name)] end |
#body ⇒ Object
15 16 17 |
# File 'lib/websocket/http/response.rb', line 15 def body @buffer.pack('C*') end |