Class: Renalware::MDMPatientsPresenter

Inherits:
Object
  • Object
show all
Includes:
PresenterHelper
Defined in:
app/presenters/renalware/mdm_patients_presenter.rb

Overview

Presenter formatting a collection of patients for use behind any MDM Patients listing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PresenterHelper

#present

Constructor Details

#initialize(patients:, view_proc:, page_title:, q:, patient_presenter_class: nil) ⇒ MDMPatientsPresenter

Returns a new instance of MDMPatientsPresenter.



8
9
10
11
12
13
14
15
16
17
18
# File 'app/presenters/renalware/mdm_patients_presenter.rb', line 8

def initialize(patients:,
               view_proc:,
               page_title:,
               q:,
               patient_presenter_class: nil)
  patient_presenter_class ||= MDMPatientPresenter
  @view_proc = view_proc
  @patients = present(patients, patient_presenter_class)
  @page_title = page_title
  @q = q
end

Instance Attribute Details

#page_titleObject (readonly)

Returns the value of attribute page_title.



7
8
9
# File 'app/presenters/renalware/mdm_patients_presenter.rb', line 7

def page_title
  @page_title
end

#patientsObject (readonly)

Returns the value of attribute patients.



7
8
9
# File 'app/presenters/renalware/mdm_patients_presenter.rb', line 7

def patients
  @patients
end

#qObject (readonly)

Returns the value of attribute q.



7
8
9
# File 'app/presenters/renalware/mdm_patients_presenter.rb', line 7

def q
  @q
end

#view_procObject (readonly)

Returns the value of attribute view_proc.



7
8
9
# File 'app/presenters/renalware/mdm_patients_presenter.rb', line 7

def view_proc
  @view_proc
end