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>)

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_nameArray<String>

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

Returns:

  • (Array<String>)

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