Sha256: 998aa2ea51d9f6412b7244e705887b5ab110096aeda63cc98fd74bd55082aa69

Contents?: true

Size: 882 Bytes

Versions: 9

Compression:

Stored size: 882 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

9 entries across 9 versions & 1 rubygems

Version Path
chatterbot-0.2.8 lib/chatterbot.rb
chatterbot-0.2.7 lib/chatterbot.rb
chatterbot-0.2.6 lib/chatterbot.rb
chatterbot-0.2.5 lib/chatterbot.rb
chatterbot-0.2.4 lib/chatterbot.rb
chatterbot-0.2.3 lib/chatterbot.rb
chatterbot-0.2.2 lib/chatterbot.rb
chatterbot-0.2.1 lib/chatterbot.rb
chatterbot-0.2.0 lib/chatterbot.rb