Module: Notifications
- Defined in:
- app/services/notifications/consolidate_notifications.rb,
app/services/notifications/consolidation_plan.rb,
app/services/notifications/consolidation_planner.rb,
app/services/notifications/delete_previous_notifications.rb
Overview
Create a new notification while deleting previous versions of it.
Constructor arguments:
-
type: The notification type. e.g. ‘Notification.types`
-
previous_query_blk: A block with the query we’ll use to find previous notifications.
Need to call #set_precondition to configure this:
-
precondition_blk: A block that receives the mutated data and returns true if we have everything we need to consolidate.
Need to call #set_mutations to configure this:
-
set_data_blk: A block that receives the notification data hash and mutates it, adding additional data needed for consolidation.
Defined Under Namespace
Classes: ConsolidateNotifications, ConsolidationPlan, ConsolidationPlanner, DeletePreviousNotifications