Module: Rubinjam::BaseAutoloadFix

Defined in:
lib/rubinjam/internal.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/rubinjam/internal.rb', line 79

def self.included(base)
  base.class_eval do
    alias autoload_without_rubinjam autoload

    def autoload(const, file)
      normalized_file = Rubinjam.normalize_file(file)
      if Rubinjam::LIBRARIES[normalized_file]
        require normalized_file
      else
        autoload_without_rubinjam(const, file)
      end
    end
  end
end