Module: Loco::Emitter

Defined in:
lib/loco/emitter.rb

Instance Method Summary collapse

Instance Method Details

#add_hub(name, members = []) ⇒ Object



14
15
16
# File 'lib/loco/emitter.rb', line 14

def add_hub(name, members = [])
  Loco.add_hub(name, members)
end

#del_hub(name) ⇒ Object



22
23
24
# File 'lib/loco/emitter.rb', line 22

def del_hub(name)
  Loco.del_hub(name)
end

#emit(obj, event = nil, opts = {}) ⇒ Object



6
7
8
# File 'lib/loco/emitter.rb', line 6

def emit(obj, event = nil, opts = {})
  Loco.emit(obj, event, opts)
end

#emit_to(recipient_s, data) ⇒ Object



10
11
12
# File 'lib/loco/emitter.rb', line 10

def emit_to(recipient_s, data)
  Loco.emit_to(recipient_s, data)
end

#get_hub(name) ⇒ Object



18
19
20
# File 'lib/loco/emitter.rb', line 18

def get_hub(name)
  Loco.get_hub(name)
end