Class: Miu::Nodes::Sana::Subscriber

Inherits:
Object
  • Object
show all
Includes:
Celluloid::ZMQ, Subscriber
Defined in:
lib/miu/nodes/sana/subscriber.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Subscriber

Returns a new instance of Subscriber.



12
13
14
15
16
17
18
# File 'lib/miu/nodes/sana/subscriber.rb', line 12

def initialize(*args)
  super
  @networks = Groonga['networks']
  @rooms = Groonga['rooms']
  @users = Groonga['users']
  @messages = Groonga['messages']
end

Instance Method Details

#on_text(tag, msg) ⇒ Object



20
21
22
23
# File 'lib/miu/nodes/sana/subscriber.rb', line 20

def on_text(tag, msg)
  add_message(msg)
  Miu::Logger.debug "[ADD] #{msg.inspect}"
end