Class: Cybertrain::WebSocket::Status
- Inherits:
-
Object
- Object
- Cybertrain::WebSocket::Status
- Defined in:
- cybertrain/websocket.rb
Overview
A snapshot of a subscription’s state, from feed_status.
Instance Method Summary collapse
-
#connected? ⇒ Boolean
Whether the feed is connected now.
-
#last_message_at ⇒ Integer
Epoch seconds of the last message, 0 for none yet.
-
#reconnects ⇒ Integer
How many times the feed connected again after its first connection.
Instance Method Details
#connected? ⇒ Boolean
Returns whether the feed is connected now.
112 113 114 |
# File 'cybertrain/websocket.rb', line 112 def connected? @connected end |
#last_message_at ⇒ Integer
Returns epoch seconds of the last message, 0 for none yet.
118 119 120 |
# File 'cybertrain/websocket.rb', line 118 def @last_message_at end |
#reconnects ⇒ Integer
Returns how many times the feed connected again after its first connection.
125 126 127 |
# File 'cybertrain/websocket.rb', line 125 def reconnects @reconnects end |