class Qbot::Adapter::Driver

Public Class Methods

build() click to toggle source
# File lib/qbot/adapter.rb, line 15
def build
  @target.new
end
inherited(subclass) click to toggle source
# File lib/qbot/adapter.rb, line 11
def inherited(subclass)
  @target = subclass
end

Public Instance Methods

listen(&block) click to toggle source
# File lib/qbot/adapter.rb, line 27
def listen(&block)
  raise 'Not implemented'
end
post(text, **options) click to toggle source
# File lib/qbot/adapter.rb, line 31
def post(text, **options)
  raise 'Not implemented'
end
run(bots) click to toggle source
# File lib/qbot/adapter.rb, line 21
def run(bots)
  listen do |message|
    bots.each { |bot| bot.listen(message.dup) }
  end
end