Class: Nanite::Ping
Overview
heartbeat packet
identity is sender’s identity status is sender’s status (see Register packet documentation)
Instance Attribute Summary collapse
-
#identity ⇒ Object
Returns the value of attribute identity.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(identity, status) ⇒ Ping
constructor
A new instance of Ping.
Methods inherited from Packet
Constructor Details
#initialize(identity, status) ⇒ Ping
Returns a new instance of Ping.
171 172 173 174 |
# File 'lib/nanite/packets.rb', line 171 def initialize(identity, status) @status = status @identity = identity end |
Instance Attribute Details
#identity ⇒ Object
Returns the value of attribute identity.
170 171 172 |
# File 'lib/nanite/packets.rb', line 170 def identity @identity end |
#status ⇒ Object
Returns the value of attribute status.
170 171 172 |
# File 'lib/nanite/packets.rb', line 170 def status @status end |
Class Method Details
.json_create(o) ⇒ Object
175 176 177 178 |
# File 'lib/nanite/packets.rb', line 175 def self.json_create(o) i = o['data'] new(i['identity'], i['status']) end |