Class: Nanite::Advertise

Inherits:
Packet show all
Defined in:
lib/nanite/packets.rb

Overview

packet that is sent by workers to the mapper when worker initially comes online to advertise it’s services

Instance Attribute Summary

Attributes inherited from Packet

#size

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Packet

#id_to_s, #to_json, #to_s

Constructor Details

#initialize(size = nil) ⇒ Advertise

Returns a new instance of Advertise.



399
400
401
# File 'lib/nanite/packets.rb', line 399

def initialize(size=nil)
  @size = size
end

Class Method Details

.json_create(o) ⇒ Object



403
404
405
# File 'lib/nanite/packets.rb', line 403

def self.json_create(o)
  new(o['size'])
end