Class: Async::WebSocket::ConnectRequest::Wrapper
- Inherits:
-
Object
- Object
- Async::WebSocket::ConnectRequest::Wrapper
- Defined in:
- lib/async/websocket/connect_request.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#response ⇒ Object
Returns the value of attribute response.
-
#stream ⇒ Object
Returns the value of attribute stream.
Instance Method Summary collapse
- #body? ⇒ Boolean
- #headers ⇒ Object
-
#initialize(stream, response) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #protocol ⇒ Object
- #status ⇒ Object
- #stream? ⇒ Boolean
Constructor Details
#initialize(stream, response) ⇒ Wrapper
Returns a new instance of Wrapper.
21 22 23 24 25 |
# File 'lib/async/websocket/connect_request.rb', line 21 def initialize(stream, response) @response = response @body = @response.body @stream = stream end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
29 30 31 |
# File 'lib/async/websocket/connect_request.rb', line 29 def body @body end |
#response ⇒ Object
Returns the value of attribute response.
27 28 29 |
# File 'lib/async/websocket/connect_request.rb', line 27 def response @response end |
#stream ⇒ Object
Returns the value of attribute stream.
30 31 32 |
# File 'lib/async/websocket/connect_request.rb', line 30 def stream @stream end |
Instance Method Details
#body? ⇒ Boolean
44 45 46 |
# File 'lib/async/websocket/connect_request.rb', line 44 def body? true end |
#headers ⇒ Object
40 41 42 |
# File 'lib/async/websocket/connect_request.rb', line 40 def headers @response.headers end |
#protocol ⇒ Object
48 49 50 |
# File 'lib/async/websocket/connect_request.rb', line 48 def protocol @response.protocol end |
#status ⇒ Object
36 37 38 |
# File 'lib/async/websocket/connect_request.rb', line 36 def status @response.status end |
#stream? ⇒ Boolean
32 33 34 |
# File 'lib/async/websocket/connect_request.rb', line 32 def stream? @response.success? and @stream end |