Class: Teamd::Discover::Message::Packet

Inherits:
RecursiveOpenStruct
  • Object
show all
Defined in:
lib/teamd/discover/message/packet.rb

Direct Known Subclasses

ClusterAnnouncement, DiscoveryRequest

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Packet

Returns a new instance of Packet.



10
11
12
13
# File 'lib/teamd/discover/message/packet.rb', line 10

def initialize params={}
  params["tid"] ||= Peer.tid
  super params
end

Instance Attribute Details

#receiverObject

Returns the value of attribute receiver.



9
10
11
# File 'lib/teamd/discover/message/packet.rb', line 9

def receiver
  @receiver
end

#senderObject

Returns the value of attribute sender.



9
10
11
# File 'lib/teamd/discover/message/packet.rb', line 9

def sender
  @sender
end

Instance Method Details

#packObject



14
15
16
# File 'lib/teamd/discover/message/packet.rb', line 14

def pack
  Message.pack @table
end