Guest User

Untitled

a guest
May 23rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. # Load all script files in /data/scripts
  2. scripts_path = File.expand_path ('.') + '/Data/Scripts'
  3. $: << scripts_path if $:.empty?
  4. scripts = Dir[scripts_path + '/*.rb']
  5. scripts.each do |file|
  6. begin
  7. load file
  8. rescue TypeError
  9. scripts.push(file)
  10. end
  11. end
Add Comment
Please, Sign In to add comment