OfficeMomsandDads/scheduler

View on GitHub
app/lib/services/notifications/needs/recipients/destroy.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module Services
  module Notifications
    class Needs
      class Recipients
        class Destroy
          include Adamantium::Flat
          include Concord.new(:need)
          include Procto.call

          delegate :office,
                   to: :need

          def recipients
            User.notifiable(office.users.schedulers) | User.notifiable(need.users)
          end
        end
      end
    end
  end
end