Class: Dcha::PacketManager
- Inherits:
-
Hash
- Object
- Hash
- Dcha::PacketManager
- Defined in:
- lib/dcha/packet_manager.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#todo ⇒ Object
readonly
Returns the value of attribute todo.
Instance Method Summary collapse
- #<<(chunk) ⇒ Object
-
#initialize ⇒ PacketManager
constructor
A new instance of PacketManager.
Constructor Details
#initialize ⇒ PacketManager
Returns a new instance of PacketManager.
6 7 8 |
# File 'lib/dcha/packet_manager.rb', line 6 def initialize @todo = Queue.new end |
Instance Attribute Details
#todo ⇒ Object (readonly)
Returns the value of attribute todo.
4 5 6 |
# File 'lib/dcha/packet_manager.rb', line 4 def todo @todo end |
Instance Method Details
#<<(chunk) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/dcha/packet_manager.rb', line 10 def <<(chunk) self[chunk.tag] ||= [] self[chunk.tag] << chunk self[chunk.tag].uniq! check(chunk) end |