module ImportRuby

Public Class Methods

require_all(_dir) click to toggle source
# File lib/importRuby.rb, line 2
def ImportRuby.require_all(_dir)
    puts "start import"
    Dir[File.expand_path(_dir, Dir.pwd) + "/**/*.rb"].each do |file|
        puts "require #{file}"
        require file
    end
end
run_all(_dir) click to toggle source
# File lib/importRuby.rb, line 9
def ImportRuby.run_all(_dir)
  puts "start run"
  Dir[File.expand_path(_dir, Dir.pwd) + "/**/*.rb"].each do |file|
    puts "run #{file}"
    system("ruby #{file}")
  end
end