Class: Renalware::Letters::Delivery::EmailLetterToPractice
- Inherits:
-
Object
- Object
- Renalware::Letters::Delivery::EmailLetterToPractice
- Defined in:
- app/models/renalware/letters/delivery/email_letter_to_practice.rb
Overview
This is a utility class that a host app might want to use to send an approved letter to the patient’s practice.
Class Method Summary collapse
Instance Method Summary collapse
-
#call ⇒ Object
Returns true: we have sent an email to the patient’s practice false: the patient does not have a practice or the practice has no email address.
Class Method Details
.call(letter) ⇒ Object
15 16 17 |
# File 'app/models/renalware/letters/delivery/email_letter_to_practice.rb', line 15 def self.call(letter) new(letter: letter).call end |
Instance Method Details
#call ⇒ Object
Returns
true: we have sent an email to the patient's practice
false: the patient does not have a practice or the practice has no email address
22 23 24 25 26 27 |
# File 'app/models/renalware/letters/delivery/email_letter_to_practice.rb', line 22 def call return false unless email_letter_to_practice? email_letter_to_the_patients_practice true end |