Sha256: 533aea5cea1d315605339f245898ff9be7ee27d9ffedcb9a79b94e25180dc895

Contents?: true

Size: 343 Bytes

Versions: 10

Compression:

Stored size: 343 Bytes

Contents

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bot-0.0.35 lib/bot/adapters/base.rb
bot-0.0.34 lib/bot/adapters/base.rb
bot-0.0.33 lib/bot/adapters/base.rb
bot-0.0.32 lib/bot/adapters/base.rb
bot-0.0.31 lib/bot/adapters/base.rb
bot-0.0.30 lib/bot/adapters/base.rb
bot-0.0.29 lib/bot/adapters/base.rb
bot-0.0.28 lib/bot/adapters/base.rb
bot-0.0.27 lib/bot/adapters/base.rb
bot-0.0.26 lib/bot/adapters/base.rb