Module: Osm::Member::EmailableContact
- Included in:
- EmergencyContact, EnableableEmailableContact
- Defined in:
- lib/osm/member.rb
Instance Method Summary collapse
-
#all_emails ⇒ Array<String>
Get an array of all emails for the contact.
-
#all_emails_with_name ⇒ Array<String>
Get an array of all emails for the contact in a format which includes their name.
Instance Method Details
#all_emails ⇒ Array<String>
Get an array of all emails for the contact
569 570 571 |
# File 'lib/osm/member.rb', line 569 def all_emails [email_1, email_2].select{ |e| !e.blank? } end |
#all_emails_with_name ⇒ Array<String>
Get an array of all emails for the contact in a format which includes their name
575 576 577 |
# File 'lib/osm/member.rb', line 575 def all_emails_with_name [email_1, email_2].select{ |e| !e.blank? }.map{ |e| "\"#{name}\" <#{e}>" } end |