Sha256: 368b422874cce7de51635ce11890f7e0989c19041d93cacdf2ca7f371665a00e

Contents?: true

Size: 398 Bytes

Versions: 9

Compression:

Stored size: 398 Bytes

Contents

require_dependency "renalware/letters/letter"

module Renalware
  module Letters
    class Letter::Approved < Letter
      def self.policy_class
        ApprovedLetterPolicy
      end

      def complete(by:)
        becomes!(Completed).tap do |letter|
          letter.by = by
          letter.completed_by = by
          letter.completed_at = Time.current
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
renalware-core-2.0.8 app/models/renalware/letters/letter/approved.rb
renalware-core-2.0.7 app/models/renalware/letters/letter/approved.rb
renalware-core-2.0.5 app/models/renalware/letters/letter/approved.rb
renalware-core-2.0.4 app/models/renalware/letters/letter/approved.rb
renalware-core-2.0.3 app/models/renalware/letters/letter/approved.rb
renalware-core-2.0.2 app/models/renalware/letters/letter/approved.rb
renalware-core-2.0.1 app/models/renalware/letters/letter/approved.rb
renalware-core-2.0.0 app/models/renalware/letters/letter/approved.rb
renalware-core-2.0.0.pre.rc13 app/models/renalware/letters/letter/approved.rb