Class: Flickwerk::PatchLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/flickwerk/patch_loader.rb

Class Method Summary collapse

Class Method Details

.call(autoloader: Rails.autoloaders.main) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/flickwerk/patch_loader.rb', line 5

def self.call(autoloader: Rails.autoloaders.main)
  Flickwerk.patches.each do |class_name, decorators|
    autoloader.on_load(class_name) do
      decorators.each(&:constantize)
    end
  end
end