Sha256: 4bafc2f9dfe666cfdfbf159d41277a520d2008b35a7fcf0f0c14ddb3dc1c00b7

Contents?: true

Size: 395 Bytes

Versions: 6

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/letters/letter_policy"

module Renalware
  module Letters
    class ElectronicReceiptPolicy < BasePolicy
      def mark_as_read?
        !record.read? && record.letter.approved?
      end

      def unread?
        index?
      end

      def read?
        index?
      end

      def sent?
        index?
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
renalware-core-2.0.15 app/policies/renalware/letters/electronic_receipt_policy.rb
renalware-core-2.0.14 app/policies/renalware/letters/electronic_receipt_policy.rb
renalware-core-2.0.13 app/policies/renalware/letters/electronic_receipt_policy.rb
renalware-core-2.0.12 app/policies/renalware/letters/electronic_receipt_policy.rb
renalware-core-2.0.11 app/policies/renalware/letters/electronic_receipt_policy.rb
renalware-core-2.0.9 app/policies/renalware/letters/electronic_receipt_policy.rb