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