Module: Chatterbot::DB
- Included in:
- Bot
- Defined in:
- lib/chatterbot/db.rb
Overview
routines for optionally interacting with a database for logging tweets, and storing config data there. Uses Sequel to handle the heavy lifing.
Instance Method Summary collapse
-
#db ⇒ Object
connect to the database, and generate any missing tables.
-
#display_db_config_notice ⇒ Object
:nocov:.
Instance Method Details
#db ⇒ Object
connect to the database, and generate any missing tables
10 11 12 |
# File 'lib/chatterbot/db.rb', line 10 def db @_db ||= connect_and_validate end |
#display_db_config_notice ⇒ Object
:nocov:
15 16 17 |
# File 'lib/chatterbot/db.rb', line 15 def display_db_config_notice puts "ERROR: You have specified a DB connection, but you need to install the sequel gem to use it" end |