Class: Async::WebSocket::Client::ClientCloseDecorator

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

Instance Method Summary collapse

Constructor Details

#initialize(client, connection) ⇒ ClientCloseDecorator

Returns a new instance of ClientCloseDecorator.



39
40
41
42
# File 'lib/async/websocket/client.rb', line 39

def initialize(client, connection)
	@client = client
	super(connection)
end

Instance Method Details

#closeObject



44
45
46
47
48
49
50
51
# File 'lib/async/websocket/client.rb', line 44

def close(...)
	super(...)
	
	if @client
		@client.close
		@client = nil
	end
end