Module: Rubotnik::Autoloader

Defined in:
lib/rubotnik/autoloader.rb

Class Method Summary collapse

Class Method Details

.load(folder) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/rubotnik/autoloader.rb', line 7

def self.load(folder)
  Dir[
    File.expand_path(
      File.join(root, folder)
    ) + "/**/*.rb"
  ].each do |file|
    require_relative file
  end
end

.rootObject



3
4
5
# File 'lib/rubotnik/autoloader.rb', line 3

def self.root
  Dir.pwd
end