Sha256: 37ca354804cf65836ba83e88aeeaa1cbcb9e43daf4571e1399b66fea85900a1b

Contents?: true

Size: 881 Bytes

Versions: 3

Compression:

Stored size: 881 Bytes

Contents

require 'yaml'
require 'twitter_oauth'

#
# Try and load Sequel, but don't freak out if it's not there
begin
  require 'sequel'
rescue Exception
end


#
# extend Hash class to turn keys into symbols
#
class Hash
  #
  # turn keys in this hash into symbols
  def symbolize_keys!
    replace(inject({}) do |hash,(key,value)|
      hash[key.to_sym] = value.is_a?(Hash) ? value.symbolize_keys! : value
      hash
    end)
  end
end

#
# the big kahuna!
module Chatterbot

  #
  # load in our assorted modules
  def self.load
    require "chatterbot/config"
    require "chatterbot/db"
    require "chatterbot/logging"
    require "chatterbot/blacklist"
    require "chatterbot/client"
    require "chatterbot/search"
    require "chatterbot/tweet"
    require "chatterbot/reply"
    require "chatterbot/helpers"    

    require "chatterbot/bot"
  end
end


# mount up
Chatterbot.load

Version data entries

3 entries across 3 versions & 1 rubygems

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