Module: Osm::Member::EmailableContact

Included in:
EmergencyContact, EnableableEmailableContact
Defined in:
lib/osm/member.rb

Instance Method Summary collapse

Instance Method Details

#all_emailsArray<String>

Get an array of all emails for the contact

Returns:

  • (Array<String>)


572
573
574
# File 'lib/osm/member.rb', line 572

def all_emails
  [email_1, email_2].select{ |e| !e.blank? }
end

#all_emails_with_nameArray<String>

Get an array of all emails for the contact in a format which includes their name

Returns:

  • (Array<String>)


578
579
580
# File 'lib/osm/member.rb', line 578

def all_emails_with_name
  [email_1, email_2].select{ |e| !e.blank? }.map{ |e| "\"#{name}\" <#{e}>" }
end