lib/duck_puncher/registration.rb in duck_puncher-4.0.0 vs lib/duck_puncher/registration.rb in duck_puncher-4.1.0
- old
+ new
@@ -5,17 +5,17 @@
target = DuckPuncher.lookup_constant target
Ducks.list[target] = [] unless Ducks.list.key?(target)
Array(mods).each do |mod|
duck = Duck.new target, mod, options
Ducks.list[target] << duck
- decorators[target] = new_decorator(duck, *Ducks[target])
+ decorators[target] = build_decorator_class(duck, *Ducks[target])
end
- nil
+ @cached_decorators = nil
end
def deregister(*classes)
classes.each &Ducks.list.method(:delete)
classes.each &decorators.method(:delete)
- nil
+ @cached_decorators = nil
end
end
end