Class: Renalware::Messaging::Internal::RecipientOptions

Inherits:
Object
  • Object
show all
Defined in:
app/models/renalware/messaging/internal/recipient_options.rb

Defined Under Namespace

Classes: Group

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(patient, author) ⇒ RecipientOptions

Returns a new instance of RecipientOptions.



26
27
28
29
# File 'app/models/renalware/messaging/internal/recipient_options.rb', line 26

def initialize(patient, author)
  @patient = patient
  @author = author
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



18
19
20
# File 'app/models/renalware/messaging/internal/recipient_options.rb', line 18

def author
  @author
end

#patientObject (readonly)

Returns the value of attribute patient.



18
19
20
# File 'app/models/renalware/messaging/internal/recipient_options.rb', line 18

def patient
  @patient
end

Instance Method Details

#to_aObject



31
32
33
34
35
36
37
# File 'app/models/renalware/messaging/internal/recipient_options.rb', line 31

def to_a
  [
    users_having_previously_received_a_message_about_patient,
    users_having_recently_received_messages_from_author,
    all_other_users
  ]
end