module Bot module Adapter class Base def initialize(config={}, &block) @config = lambda { |u| config.merge(block ? block.call(u) : {}) } end def config(username=nil) @config.call(username) end def send_messages(messages, from) raise NotImplementedError end end end end