Method: Chatterbot::Config#working_dir
- Defined in:
- lib/chatterbot/config.rb
#working_dir ⇒ Object
if we are called by a bot, we want to use the directory of that script. If we are called by chatterbot-register or another helper script, we want to use the current working directory
152 153 154 155 156 157 158 159 |
# File 'lib/chatterbot/config.rb', line 152 def working_dir if chatterbot_helper? Dir.getwd else File.dirname($0) #Dir.pwd end end |