lib/datadog/notifications.rb in datadog-notifications-0.5.4 vs lib/datadog/notifications.rb in datadog-notifications-0.6.0
- old
+ new
@@ -32,10 +32,10 @@
def self.configure(&block)
if instance.instance_variable_defined?(:@reporter)
warn "#{name} cannot be reconfigured once it has subscribed to notifications, called from: #{caller(2..2).first}"
return
end
- block.call instance.config if block
+ block&.call instance.config
end
# You can subscribe to events exactly as with ActiveSupport::Notifications, but there will be an
# additional `statsd` block parameter available:
#