class Object
Public Class Methods
const_missing(const)
click to toggle source
# File lib/laris/autoloader.rb, line 9 def self.const_missing(const) auto_load(const) Kernel.const_get(const) end
Private Instance Methods
auto_load(const)
click to toggle source
# File lib/laris/autoloader.rb, line 15 def auto_load(const) Laris::AUTOLOAD_PATHS.each do |folder| file = File.join(Laris::ROOT, folder, const.to_s.underscore) return if try_auto_load(file) end end
try_auto_load(file)
click to toggle source
# File lib/laris/autoloader.rb, line 22 def try_auto_load(file) require_relative(file) return true rescue LoadError false end