Module: Osm::Member::EnableablePhoneableContact

Included in:
MemberContact, PrimaryContact
Defined in:
lib/osm/member.rb

Instance Method Summary collapse

Instance Method Details

#enabled_phonesObject

Get an array of enabled phone numbers for the contact


605
606
607
608
609
610
# File 'lib/osm/member.rb', line 605

def enabled_phones
  phones = []
  phones.push phone_1.gsub(/[^\d\+]/, '') if receive_phone_1
  phones.push phone_2.gsub(/[^\d\+]/, '') if receive_phone_2
  phones.select{ |n| !n.blank? }.map{ |n| n }
end