Module: Puggernaut::Server::Tcp
- Includes:
- Logger
- Defined in:
- lib/puggernaut/server/tcp.rb
Instance Method Summary collapse
Methods included from Logger
Instance Method Details
#receive_data(data) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/puggernaut/server/tcp.rb', line 7 def receive_data(data) = data.split("\n").inject({}) do |hash, line| channel, = line.split('|', 2) hash[channel] ||= [] hash[channel] << hash end Channel.say send_data "OK\n" end |