Class: Teamd::Discover::Message::Packet
- Inherits:
-
RecursiveOpenStruct
- Object
- RecursiveOpenStruct
- Teamd::Discover::Message::Packet
- Defined in:
- lib/teamd/discover/message/packet.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#receiver ⇒ Object
Returns the value of attribute receiver.
-
#sender ⇒ Object
Returns the value of attribute sender.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Packet
constructor
A new instance of Packet.
- #pack ⇒ Object
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
#receiver ⇒ Object
Returns the value of attribute receiver.
9 10 11 |
# File 'lib/teamd/discover/message/packet.rb', line 9 def receiver @receiver end |
#sender ⇒ Object
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
#pack ⇒ Object
14 15 16 |
# File 'lib/teamd/discover/message/packet.rb', line 14 def pack Message.pack @table end |