Sha256: da4eb69785028eaded193093acdba0bd5919d18286cde8048756811657196729

Contents?: true

Size: 453 Bytes

Versions: 6

Compression:

Stored size: 453 Bytes

Contents

module Renalware
  module Transplants
    class PatientPresenter < SimpleDelegator
      def initialize(patient)
        patient = patient.__getobj__ if patient.respond_to?(:__getobj__)
        super(Transplants.cast_patient(patient))
      end

      def current_registration_status
        @current_registration_status ||= begin
          Transplants::Registration.for_patient(__getobj__).first&.current_status
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc6 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.0.pre.rc5 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.0.pre.rc4 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.0.pre.rc3 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.0.pre.rc1 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.0.pre.beta12 app/presenters/renalware/transplants/patient_presenter.rb