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.
36 37 38 39 40 |
# File 'lib/async/websocket/connect_request.rb', line 36 def initialize(stream, response) @response = response @body = @response.body @stream = stream end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
44 45 46 |
# File 'lib/async/websocket/connect_request.rb', line 44 def body @body end |
#response ⇒ Object
Returns the value of attribute response.
42 43 44 |
# File 'lib/async/websocket/connect_request.rb', line 42 def response @response end |
#stream ⇒ Object
Returns the value of attribute stream.
45 46 47 |
# File 'lib/async/websocket/connect_request.rb', line 45 def stream @stream end |
Instance Method Details
#body? ⇒ Boolean
59 60 61 |
# File 'lib/async/websocket/connect_request.rb', line 59 def body? true end |
#headers ⇒ Object
55 56 57 |
# File 'lib/async/websocket/connect_request.rb', line 55 def headers @response.headers end |
#protocol ⇒ Object
63 64 65 |
# File 'lib/async/websocket/connect_request.rb', line 63 def protocol @response.protocol end |
#status ⇒ Object
51 52 53 |
# File 'lib/async/websocket/connect_request.rb', line 51 def status @response.status end |
#stream? ⇒ Boolean
47 48 49 |
# File 'lib/async/websocket/connect_request.rb', line 47 def stream? @response.success? and @stream end |