Sha256: 2764a7b2e2e39ec52fe9398d555176917af1da33b61e900968598b27b68ee6bd

Contents?: true

Size: 533 Bytes

Versions: 2

Compression:

Stored size: 533 Bytes

Contents

# frozen_string_literal: true

require "collection_presenter"

module Renalware
  module Letters
    module Printing
      class PrintableRecipients
        def self.for(letter)
          recipients = [letter.main_recipient]
          recipients.concat(letter.cc_recipients)
          recipients.reject do |recipient|
            recipient.statment_to_indicate_letter_will_be_emailed.present?
          end
          CollectionPresenter.new(recipients, RecipientPresenter::WithCurrentAddress)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
renalware-core-2.0.48 app/models/renalware/letters/printing/printable_recipients.rb
renalware-core-2.0.47 app/models/renalware/letters/printing/printable_recipients.rb