Class: Arcp::Session::Ping

Inherits:
Data
  • Object
show all
Defined in:
lib/arcp/session/ping.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nonceObject (readonly)

Returns the value of attribute nonce

Returns:

  • (Object)

    the current value of nonce



5
6
7
# File 'lib/arcp/session/ping.rb', line 5

def nonce
  @nonce
end

#sent_atObject (readonly)

Returns the value of attribute sent_at

Returns:

  • (Object)

    the current value of 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_hObject



11
# File 'lib/arcp/session/ping.rb', line 11

def to_h = { 'nonce' => nonce, 'sent_at' => sent_at }