Sha256: 64e0d75ce95771c58c9028f96aa8c88f5f331d6ef27fd10483f7efdbc35bcd54

Contents?: true

Size: 599 Bytes

Versions: 3

Compression:

Stored size: 599 Bytes

Contents

module Chatterbot

  #
  # primary Bot object, includes all the other modules
  class Bot
    include Blacklist
    include Config
    include Logging
    include Search
    include Tweet
    include Reply
    include Client
    include DB
    include Helpers

    #
    # Create a new bot. No options for now.
    def initialize(params={})
      if params.has_key?(:name)
        @botname = params.delete(:name)
      end

      @config = load_config(params)
      
      # update config when we exit
      at_exit do
        raise $! if $!
        update_config
      end  
    end
    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chatterbot-0.4.0 lib/chatterbot/bot.rb
chatterbot-0.3.0 lib/chatterbot/bot.rb
chatterbot-0.2.9 lib/chatterbot/bot.rb