Class: Arcp::Session::Pong
- Inherits:
-
Data
- Object
- Data
- Arcp::Session::Pong
- Defined in:
- lib/arcp/session/pong.rb
Instance Attribute Summary collapse
-
#ping_nonce ⇒ Object
readonly
Returns the value of attribute ping_nonce.
-
#received_at ⇒ Object
readonly
Returns the value of attribute received_at.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#ping_nonce ⇒ Object (readonly)
Returns the value of attribute ping_nonce
5 6 7 |
# File 'lib/arcp/session/pong.rb', line 5 def ping_nonce @ping_nonce end |
#received_at ⇒ Object (readonly)
Returns the value of attribute received_at
5 6 7 |
# File 'lib/arcp/session/pong.rb', line 5 def received_at @received_at end |
Class Method Details
.from_h(h) ⇒ Object
6 7 8 9 |
# File 'lib/arcp/session/pong.rb', line 6 def self.from_h(h) h = h.transform_keys(&:to_s) new(ping_nonce: h.fetch('ping_nonce'), received_at: h.fetch('received_at')) end |
Instance Method Details
#to_h ⇒ Object
11 |
# File 'lib/arcp/session/pong.rb', line 11 def to_h = { 'ping_nonce' => ping_nonce, 'received_at' => received_at } |