Class: Bot::Adapter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/bot/adapters/base.rb

Direct Known Subclasses

Kik, Test

Instance Method Summary collapse

Constructor Details

#initialize(config = {}, &block) ⇒ Base

Returns a new instance of Base.



4
5
6
# File 'lib/bot/adapters/base.rb', line 4

def initialize(config={}, &block)
  @config = lambda { |u| config.merge(block ? block.call(u) : {}) }
end

Instance Method Details

#config(username = nil) ⇒ Object



8
9
10
# File 'lib/bot/adapters/base.rb', line 8

def config(username=nil)
  @config.call(username)
end

#send_messages(messages, from) ⇒ Object

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/bot/adapters/base.rb', line 12

def send_messages(messages, from)
  raise NotImplementedError
end

#verify_request(request) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/bot/adapters/base.rb', line 16

def verify_request(request)
  raise NotImplementedError
end