Module: ImportRuby

Defined in:
lib/importRuby.rb

Class Method Summary collapse

Class Method Details

.require_all(_dir) ⇒ Object



2
3
4
5
6
7
8
# 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) ⇒ Object



9
10
11
12
13
14
15
# 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