Module: Chatterbot

Defined in:
lib/chatterbot.rb,
lib/chatterbot/ui.rb,
lib/chatterbot/bot.rb,
lib/chatterbot/dsl.rb,
lib/chatterbot/reply.rb,
lib/chatterbot/tweet.rb,
lib/chatterbot/utils.rb,
lib/chatterbot/client.rb,
lib/chatterbot/config.rb,
lib/chatterbot/search.rb,
lib/chatterbot/handler.rb,
lib/chatterbot/helpers.rb,
lib/chatterbot/logging.rb,
lib/chatterbot/profile.rb,
lib/chatterbot/retweet.rb,
lib/chatterbot/version.rb,
lib/chatterbot/favorite.rb,
lib/chatterbot/safelist.rb,
lib/chatterbot/skeleton.rb,
lib/chatterbot/blocklist.rb,
lib/chatterbot/followers.rb,
lib/chatterbot/streaming.rb,
lib/chatterbot/home_timeline.rb,
lib/chatterbot/config_manager.rb,
lib/chatterbot/direct_messages.rb

Overview

the big kahuna!

Defined Under Namespace

Modules: Blocklist, Client, Config, DSL, DirectMessages, Favorite, Followers, Helpers, HomeTimeline, Logging, Profile, Reply, Retweet, Safelist, Search, Streaming, Tweet, UI, Utils Classes: Bot, ConfigManager, Handler, Skeleton

Constant Summary collapse

VERSION =
"2.0.2"
@@from_helper =
false

Class Method Summary collapse

Class Method Details

.from_helperObject

are we being called from a helper script?



59
60
61
# File 'lib/chatterbot.rb', line 59

def self.from_helper
  @@from_helper
end

.from_helper=(x) ⇒ Object

setter to track if we’re being called from a helper script



54
55
56
# File 'lib/chatterbot.rb', line 54

def self.from_helper=(x)
  @@from_helper = x
end

.libdirObject

Return a directory with the project libraries.



66
67
68
69
70
71
# File 'lib/chatterbot.rb', line 66

def self.libdir
  t = [File.expand_path(File.dirname(__FILE__)), "#{Gem.dir}/gems/chatterbot-#{Chatterbot::VERSION}"]

  t.each {|i| return i if File.readable?(i) }
  raise "both paths are invalid: #{t}"
end

.loadObject

load in our assorted modules



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/chatterbot.rb', line 29

def self.load
  require "chatterbot/config_manager"
  require "chatterbot/config"
  require "chatterbot/logging"
  require "chatterbot/blocklist"
  require "chatterbot/safelist"
  require "chatterbot/ui"
  require "chatterbot/client"    
  require "chatterbot/search"
  require "chatterbot/direct_messages"    
  require "chatterbot/tweet"
  require "chatterbot/retweet"
  require "chatterbot/favorite"
  require "chatterbot/profile"
  require "chatterbot/reply"
  require "chatterbot/home_timeline"
  require "chatterbot/followers"
  require "chatterbot/helpers"
  require "chatterbot/utils"
  require "chatterbot/streaming"

  require "chatterbot/bot"
end