Method: Twittbot::Bot#load_bot_code
- Defined in:
- lib/twittbot/bot.rb
#load_bot_code ⇒ Object
Loads the bot’s actual code which is stored in the bot’s lib subdirectory.
162 163 164 165 166 167 168 |
# File 'lib/twittbot/bot.rb', line 162 def load_bot_code load_special_tasks files = Dir["#{File.('./lib', @options[:current_dir])}/**/*"] files.each do |file| require_relative file.sub(/\.rb$/, '') if file.end_with? '.rb' end end |