Class: Ruboty::Adapters::LineBot

Inherits:
Base
  • Object
show all
Defined in:
lib/ruboty/adapters/line_bot.rb

Instance Method Summary collapse

Instance Method Details

#initObject



21
22
23
24
# File 'lib/ruboty/adapters/line_bot.rb', line 21

def init
  @queue = Queue.new
  @cached_contacts = {}
end

#runObject



15
16
17
18
19
# File 'lib/ruboty/adapters/line_bot.rb', line 15

def run
  init
  serve
  main_loop
end

#say(message) ⇒ Object



26
27
28
29
30
31
# File 'lib/ruboty/adapters/line_bot.rb', line 26

def say(message)
  client.send_text(
    to_mid: message[:original][:from_mid],
    text:   message[:body],
  )
end