Exception: Anyt::Client::DisconnectedError
- Defined in:
- lib/anyt/client.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Instance Method Summary collapse
-
#initialize(event) ⇒ DisconnectedError
constructor
A new instance of DisconnectedError.
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
#event ⇒ Object (readonly)
Returns the value of attribute event.
17 18 19 |
# File 'lib/anyt/client.rb', line 17 def event @event end |