Class: Lono::Pro::Autoloader

Inherits:
Object
  • Object
show all
Defined in:
lib/lono/pro/autoloader.rb

Defined Under Namespace

Classes: Inflector

Class Method Summary collapse

Class Method Details

.require!Object



25
26
27
# File 'lib/lono/pro/autoloader.rb', line 25

def require!
  setup.eager_load
end

.setupObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/lono/pro/autoloader.rb', line 14

def setup
  loader = Zeitwerk::Loader.new
  loader.log! if ENV["LONO_PRO_ZEITWERK_LOG"]
  loader.inflector = Inflector.new
  lib = File.expand_path("../..", __dir__) # lono-pro/lib
  loader.push_dir(lib)
  loader.ignore("#{lib}/lono-pro.rb")
  loader.setup
  loader
end