Sha256: 394fc3e4798fad3413bc7d8dbca329d37b4f6a977fe1fece3664753e889fbebb
Contents?: true
Size: 391 Bytes
Versions: 9
Compression:
Stored size: 391 Bytes
Contents
module Puggernaut class Server module Tcp include Logger def receive_data(data) messages = data.split("\n").inject({}) do |hash, line| channel, message = line.split('|', 2) hash[channel] ||= [] hash[channel] << message hash end Channel.say messages send_data "OK\n" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems