The personal finance app for everyone (by everyone)
Ruby
class LunchflowItem::SyncCompleteEvent
attr_reader :lunchflow_item
def initialize(lunchflow_item)
@lunchflow_item = lunchflow_item
end
def broadcast
# Update UI with latest account data
lunchflow_item.accounts.each do |account|
account.broadcast_sync_complete
end
# Let family handle sync notifications
lunchflow_item.family.broadcast_sync_complete
end
end