Module: Flickwerk

Defined in:
lib/flickwerk.rb,
lib/flickwerk/version.rb,
lib/flickwerk/patchify.rb,
lib/flickwerk/patch_finder.rb,
lib/flickwerk/patch_loader.rb

Defined Under Namespace

Classes: Error, PatchFinder, PatchLoader, Patchify, Railtie

Constant Summary collapse

VERSION =
"0.3.6"

Class Method Summary collapse

Class Method Details

.included(engine) ⇒ Object



15
16
17
18
19
# File 'lib/flickwerk.rb', line 15

def self.included(engine)
  engine_patch_paths = engine.root.glob("app/patches/*")
  engine.config.autoload_paths += engine_patch_paths
  Flickwerk.patch_paths += engine_patch_paths
end

.patch(class_name, with:) ⇒ Object



21
22
23
24
# File 'lib/flickwerk.rb', line 21

def self.patch(class_name, with:)
  klass_name = aliases[class_name] || class_name
  patches[klass_name] += [with]
end