lib/dry/system/plugins/monitoring.rb in dry-system-0.12.0 vs lib/dry/system/plugins/monitoring.rb in dry-system-0.13.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'dry/system/constants'
require 'dry/system/plugins/monitoring/proxy'
module Dry
module System
@@ -33,10 +35,10 @@
proxy.monitored_methods.each do |meth|
notifications.subscribe(:monitoring, target: key, method: meth, &block)
end
end
- decorate(key, with: proxy.new(target, notifications))
+ decorate(key, with: -> target { proxy.new(target, notifications) })
end
end
end
end
end