Exception: Anyt::Client::DisconnectedError

Inherits:
Error
  • Object
show all
Defined in:
lib/anyt/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event) ⇒ DisconnectedError

Returns a new instance of DisconnectedError.



19
20
21
22
23
24
25
26
# File 'lib/anyt/client.rb', line 19

def initialize(event)
  @event = event
  if event
    super("WebSocket disconnected (code=#{event.code}, reason=#{event.data})")
  else
    super("WebSocket disconnected abnormally")
  end
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



17
18
19
# File 'lib/anyt/client.rb', line 17

def event
  @event
end