Class: Kingsman::Autoloader

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

Defined Under Namespace

Classes: Inflector

Class Method Summary collapse

Class Method Details

.setupObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/kingsman/autoloader.rb', line 13

def setup
  loader = Zeitwerk::Loader.new
  loader.inflector = Inflector.new
  lib = File.dirname(__dir__)
  loader.push_dir(lib) # lib
  loader.do_not_eager_load("#{lib}/generators")
  loader.do_not_eager_load("#{lib}/kingsman/models/omniauthable.rb")
  loader.ignore("#{lib}/kingsman/omniauth.rb")
  loader.ignore("#{lib}/kingsman/hooks")
  loader.ignore("#{lib}/kingsman/jets.rb")
  loader.ignore("#{lib}/kingsman/jets")
  loader.ignore("#{lib}/kingsman/modules.rb")
  loader.ignore("#{lib}/kingsman/orm")
  loader.ignore("#{lib}/kingsman/routes.rb")
  loader.setup
end