Class: Thronglets::Loader
- Inherits:
-
Object
- Object
- Thronglets::Loader
- Defined in:
- lib/thronglets/loader.rb
Instance Attribute Summary collapse
-
#loader ⇒ Object
readonly
Returns the value of attribute loader.
Instance Method Summary collapse
-
#initialize ⇒ Loader
constructor
A new instance of Loader.
- #load ⇒ Object
Constructor Details
#initialize ⇒ Loader
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
#loader ⇒ Object (readonly)
Returns the value of attribute loader.
4 5 6 |
# File 'lib/thronglets/loader.rb', line 4 def loader @loader end |
Instance Method Details
#load ⇒ Object
19 20 21 |
# File 'lib/thronglets/loader.rb', line 19 def load loader.setup end |