Method: Optimizely::NotificationCenter#clear_notification_listeners

Defined in:
lib/optimizely/notification_center.rb

#clear_notification_listeners(notification_type) ⇒ Object

Removes notifications for a certain notification type

Parameters:

  • notification_type
    • one of the constants in NOTIFICATION_TYPES



109
110
111
112
113
114
# File 'lib/optimizely/notification_center.rb', line 109

def clear_notification_listeners(notification_type)
  return nil unless notification_type_valid?(notification_type)

  @notifications[notification_type] = []
  @logger.log Logger::INFO, "All callbacks for notification type #{notification_type} have been removed."
end