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



608
609
610
611
612
613
# File 'lib/osm/member.rb', line 608

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