Class: BotMob::Application

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/bot_mob/application.rb

Overview

## BotMob::Application

This is the base application class for BotMob.

Instance Method Summary collapse

Instance Method Details

#start!Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/bot_mob/application.rb', line 12

def start!
  BotMob.logger.info("=> BotMob #{BotMob::VERSION} application starting")

  roster.load
  wire.listen { |auth| roster.connect(auth) }

  loop do
    sleep(10)
    # Avoid polling at all for the time being
    # roster.load if roster.available? && !wire.available?
  end
end