Class: Renalware::Transplants::PatientPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Renalware::Transplants::PatientPresenter
- Defined in:
- app/presenters/renalware/transplants/patient_presenter.rb
Instance Method Summary collapse
- #current_registration_status ⇒ Object
-
#initialize(patient) ⇒ PatientPresenter
constructor
A new instance of PatientPresenter.
Constructor Details
#initialize(patient) ⇒ PatientPresenter
Returns a new instance of PatientPresenter.
8 9 10 11 |
# File 'app/presenters/renalware/transplants/patient_presenter.rb', line 8 def initialize(patient) patient = patient.__getobj__ if patient.respond_to?(:__getobj__) super(Transplants.cast_patient(patient)) end |
Instance Method Details
#current_registration_status ⇒ Object
13 14 15 16 17 |
# File 'app/presenters/renalware/transplants/patient_presenter.rb', line 13 def current_registration_status @current_registration_status ||= begin Transplants::Registration.for_patient(__getobj__).first&.current_status end end |