Sha256: 3f16140fe21b8ea4f81a8583fa24e60fc9bb89288d814196cff5f373ec15fafe

Contents?: true

Size: 366 Bytes

Versions: 2

Compression:

Stored size: 366 Bytes

Contents

# frozen_string_literal: true

module Engine
  module AutoLoader
    def self.load(load_path = nil)
      base_dir = File.expand_path(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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_rpg-0.0.4 lib/engine/autoloader.rb
ruby_rpg-0.0.3 lib/engine/autoloader.rb