Sha256: 01c35f0e9941d8efd04720567b7066ebbe332817cee3be38a23e9bfee53d0b71
Contents?: true
Size: 521 Bytes
Versions: 4
Compression:
Stored size: 521 Bytes
Contents
module Chatterbot # # bot template generator class Skeleton class << self # # generate a template file for the specified bot # @param [Bot] bot object # 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 }) puts opts.inspect src % opts end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
chatterbot-2.0.5 | lib/chatterbot/skeleton.rb |
chatterbot-2.0.4 | lib/chatterbot/skeleton.rb |
chatterbot-2.0.3 | lib/chatterbot/skeleton.rb |
chatterbot-2.0.2 | lib/chatterbot/skeleton.rb |