Module: Engine::AutoLoader
- Defined in:
- lib/engine/autoloader.rb
Class Method Summary collapse
Class Method Details
.load(load_path = nil) ⇒ Object
5 6 7 8 9 |
# File 'lib/engine/autoloader.rb', line 5 def self.load(load_path = nil) base_dir = File.(load_path || File.dirname($PROGRAM_NAME)) Dir[File.join(base_dir, "components", "**/*.rb")].each { |file| require file } Dir[File.join(base_dir, "game_objects", "**/*.rb")].each { |file| require file } end |