Sha256: 1c4ffccbcd9cfee068b863b19a570ee2ac25e25f9798878b2a19df6c3983051d

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 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 Retweet
    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

2 entries across 2 versions & 1 rubygems

Version Path
chatterbot-0.5.1 lib/chatterbot/bot.rb
chatterbot-0.5.0 lib/chatterbot/bot.rb