lib/dry/behaviour/black_tie.rb in dry-behaviour-0.5.2 vs lib/dry/behaviour/black_tie.rb in dry-behaviour-0.6.0
- old
+ new
@@ -87,10 +87,11 @@
BlackTie.Logger.warn("Implicit delegate #{protocol.inspect}##{m} to #{target}")
DELEGATE_METHOD.(mod.singleton_class, [m] * 2)
acc << m
end
end.each do |m|
- [*target].each do |tgt|
+ target = [target] unless target.is_a?(Array)
+ target.each do |tgt|
BlackTie.implementations[protocol][tgt][m] = mod.method(m).to_proc
end
end
end
end