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