lib/sinbotra/bot.rb in sinbotra-0.1.0 vs lib/sinbotra/bot.rb in sinbotra-0.1.1

- old
+ new

@@ -7,19 +7,21 @@ module Sinbotra class Bot class << self def handle(provider, entry) + Sinbotra::Config.logger.debug("ENTRY DEBUG:\n" + entry.inspect) if ENV["DEBUG"] perform_async(provider, entry) end def add_handler(provider, handler) @handlers ||= {} @handlers[provider.to_sym] = handler end def receive(provider, msg) handler = @handlers[provider.to_sym] + Sinbotra::Config.logger.debug("MESSAGE DEBUG:\n" + msg.inspect) if ENV["DEBUG"] handler.handle_message(msg) end end include SuckerPunch::Job