Class: Adhearsion::Initializer::XMPPInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/adhearsion/initializer/xmpp.rb

Class Method Summary collapse

Class Method Details

.startObject



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/adhearsion/initializer/xmpp.rb', line 10

def start
  require_dependencies
  XMPP::Connection.extend Blather::DSL
  ahn_config    = Adhearsion::AHN_CONFIG
  self.config   = ahn_config.xmpp
  self.jid      = config.jid
  self.password = config.password
  self.server   = config.server
  self.port     = config.port

  XMPP::Connection.start(jid, password, server, port)
end

.stopObject



23
24
25
# File 'lib/adhearsion/initializer/xmpp.rb', line 23

def stop
  XMPP::Connection.stop
end