Class: Nem::Model::NetworkTime

Inherits:
Object
  • Object
show all
Includes:
Nem::Mixin::Assignable
Defined in:
lib/nem/model/network_time.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#receive_timestampObject (readonly)

Returns the value of attribute receive_timestamp.



6
7
8
# File 'lib/nem/model/network_time.rb', line 6

def receive_timestamp
  @receive_timestamp
end

#send_timestampObject (readonly)

Returns the value of attribute send_timestamp.



6
7
8
# File 'lib/nem/model/network_time.rb', line 6

def send_timestamp
  @send_timestamp
end

Class Method Details

.new_from_network_time(hash) ⇒ Object



8
9
10
11
12
13
# File 'lib/nem/model/network_time.rb', line 8

def self.new_from_network_time(hash)
  new(
    send_timestamp: hash[:sendTimeStamp],
    receive_timestamp: hash[:receiveTimeStamp]
  )
end