Class: Coinex::Autoloader

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

Defined Under Namespace

Classes: Inflector

Constant Summary collapse

LIB_PATH =
::File.dirname(__dir__).freeze

Class Method Summary collapse

Class Method Details

.setup!Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/coinex/autoloader.rb', line 20

def setup!
  loader = ::Zeitwerk::Loader.new
  loader.tag = 'coinex'
  loader.inflector = Inflector.new
  loader.push_dir(LIB_PATH)
  loader.collapse(::File.join(LIB_PATH, 'coinex', 'resources'))

  ignored_paths.each { |path| loader.ignore(path) }

  loader.setup
end