app/services/sync_and_notify_bot.rb
# Syncs Locations by calling LocationSyncer.call. If any Locations were
# created/updated, DMs the updates by calling Notifier.call. In either case,
# returns results as a Hash.
#
# @return [Hash] LocationSyncer or Notifier results
# @example
#   SyncAndNotifyBot.call
#     => {
#             :new => 388,
#         :updated => 0,
#            :zips => [
#                       "90044",
#                       "91340",
#                       ...
#                     ],
#           :total => 405
#     }
Syncs Locations by calling LocationSyncer.call. If any Locations were
created/updated, DMs the updates by calling Notifier.call. In either case,
returns results as a Hash.
Syncs Locations by calling LocationSyncer . call . If any Locations were created / updated DMs the updates by calling Notifier . call . In either case returns results as a Hash .
def call
    results = LocationSyncer.call
    return results unless results[:zips]&.size&.positive?
    Notifier.call(UserZip.where(zip: results[:zips]))
  end
def call results = LocationSyncer . call return results unless results [ :zips ] &. size &. positive? Notifier . call ( UserZip . where ( zip : results [ :zips ] ) ) end
Syncs Locations by calling LocationSyncer.call.
Syncs Locations by calling LocationSyncer . call .
LocationSyncer or Notifier results
LocationSyncer or Notifier results
Hash
example
None