Class: Chatterbot::Skeleton
- Inherits:
-
Object
- Object
- Chatterbot::Skeleton
- Defined in:
- lib/chatterbot/skeleton.rb
Overview
bot template generator
Class Method Summary collapse
-
.generate(bot) ⇒ Object
generate a template file for the specified bot.
Class Method Details
.generate(bot) ⇒ Object
generate a template file for the specified bot
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/chatterbot/skeleton.rb', line 12 def generate(bot) path = File.join(Chatterbot.libdir, "..", "templates", "skeleton.txt") src = File.read(path) opts = bot.config.to_h.merge({ :name => bot.botname, :timestamp => Time.now }) src % opts end |