Class: Flipper::Notifications::FeaturesSubscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/flipper/notifications/features_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object



10
11
12
13
14
15
# File 'lib/flipper/notifications/features_subscriber.rb', line 10

def call(*args)
  return unless enabled?

  event = FeatureEvent.from_active_support(event: ActiveSupport::Notifications::Event.new(*args))
  Flipper::Notifications.notify(event: event) if event.noteworthy?
end