lib/phobos/instrumentation.rb in phobos-1.8.0 vs lib/phobos/instrumentation.rb in phobos-1.8.1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'active_support/notifications'
module Phobos
module Instrumentation
NAMESPACE = 'phobos'
@@ -13,11 +15,11 @@
def self.unsubscribe(subscriber)
ActiveSupport::Notifications.unsubscribe(subscriber)
end
def instrument(event, extra = {})
- ActiveSupport::Notifications.instrument("#{NAMESPACE}.#{event}", extra) do |extra|
- yield(extra) if block_given?
+ ActiveSupport::Notifications.instrument("#{NAMESPACE}.#{event}", extra) do |args|
+ yield(args) if block_given?
end
end
end
end