Class: Renalware::HD::PrescriptionLastAdministrationComponent
- Inherits:
-
ApplicationComponent
- Object
- ActionView::Component::Base
- ApplicationComponent
- Renalware::HD::PrescriptionLastAdministrationComponent
- Defined in:
- app/components/renalware/hd/prescription_last_administration_component.rb
Instance Attribute Summary collapse
-
#prescription ⇒ Object
readonly
Returns the value of attribute prescription.
Instance Method Summary collapse
-
#initialize(prescription:) ⇒ PrescriptionLastAdministrationComponent
constructor
A new instance of PrescriptionLastAdministrationComponent.
- #last_administration ⇒ Object
Methods inherited from ApplicationComponent
Constructor Details
#initialize(prescription:) ⇒ PrescriptionLastAdministrationComponent
Returns a new instance of PrescriptionLastAdministrationComponent.
9 10 11 |
# File 'app/components/renalware/hd/prescription_last_administration_component.rb', line 9 def initialize(prescription:) @prescription = prescription end |
Instance Attribute Details
#prescription ⇒ Object (readonly)
Returns the value of attribute prescription.
6 7 8 |
# File 'app/components/renalware/hd/prescription_last_administration_component.rb', line 6 def prescription @prescription end |
Instance Method Details
#last_administration ⇒ Object
13 14 15 16 |
# File 'app/components/renalware/hd/prescription_last_administration_component.rb', line 13 def last_administration @last_administration ||= PrescriptionLastAdministrationQuery.new(prescription: prescription).call end |