Class: Thronglets::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/thronglets/loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLoader

Returns a new instance of Loader.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/thronglets/loader.rb', line 6

def initialize
  @loader = Zeitwerk::Loader.new
  [
    "app/activities",
    "app/actors",
    "app/workflows",
    "app/models",
    "app/models/concerns",
  ].each do |path|
    loader.push_dir(path) if Dir.exist?(path)
  end
end

Instance Attribute Details

#loaderObject (readonly)

Returns the value of attribute loader.



4
5
6
# File 'lib/thronglets/loader.rb', line 4

def loader
  @loader
end

Instance Method Details

#loadObject



19
20
21
# File 'lib/thronglets/loader.rb', line 19

def load
  loader.setup
end