Class: Bot::Adapter::Base
- Inherits:
-
Object
- Object
- Bot::Adapter::Base
- Defined in:
- lib/bot/adapters/base.rb
Instance Method Summary collapse
- #config(username = nil) ⇒ Object
-
#initialize(config = {}, &block) ⇒ Base
constructor
A new instance of Base.
- #send_messages(messages, from) ⇒ Object
- #verify_request(request) ⇒ Object
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
12 13 14 |
# File 'lib/bot/adapters/base.rb', line 12 def (, from) raise NotImplementedError end |
#verify_request(request) ⇒ Object
16 17 18 |
# File 'lib/bot/adapters/base.rb', line 16 def verify_request(request) raise NotImplementedError end |