Method: EventBus::SingletonMixin#ebus_bind!

Defined in:
lib/ls4/lib/ebus.rb

#ebus_bind!Object Also known as: bind!



304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/ls4/lib/ebus.rb', line 304

def ebus_bind!
  constants.each {|const|
    if const.to_s =~ /^EBUS_CONNECT_.*/
      e = const_get(const)
      if e.bus.is_a?(Symbol)
        bus = eval("#{e.bus}")
      else
        bus = e.bus
      end
      bus.__send__("connect_#{e.slot}", instance.method(e.mname))
    end
  }
  self
end