Class: Boty::Session

Inherits:
Object
  • Object
show all
Includes:
Logger
Defined in:
lib/boty/session.rb

Instance Attribute Summary collapse

Attributes included from Logger

#logger

Instance Method Summary collapse

Methods included from Logger

adapter, adapter=, #log_error

Instance Attribute Details

#botObject (readonly)

Returns the value of attribute bot.



7
8
9
# File 'lib/boty/session.rb', line 7

def bot
  @bot
end

Instance Method Details

#start(&block) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/boty/session.rb', line 9

def start(&block)
  EM.run do
    
    @bot = initialize_bot(&block)
    stablish_connection
  end
  self
end