Class: Async::WebSocket::ConnectRequest::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/async/websocket/connect_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject

Returns the value of attribute body.



45
46
47
# File 'lib/async/websocket/connect_request.rb', line 45

def body
  @body
end

#responseObject

Returns the value of attribute response.



43
44
45
# File 'lib/async/websocket/connect_request.rb', line 43

def response
  @response
end

#streamObject

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

Returns:

  • (Boolean)


60
61
62
# File 'lib/async/websocket/connect_request.rb', line 60

def body?
	true
end

#headersObject



56
57
58
# File 'lib/async/websocket/connect_request.rb', line 56

def headers
	@response.headers
end

#protocolObject



64
65
66
# File 'lib/async/websocket/connect_request.rb', line 64

def protocol
	@response.protocol
end

#statusObject



52
53
54
# File 'lib/async/websocket/connect_request.rb', line 52

def status
	@response.status
end

#stream?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/async/websocket/connect_request.rb', line 48

def stream?
	@response.success? and @stream
end