Module: StupidSMS::Phone

Defined in:
lib/stupid_sms/phone.rb

Class Method Summary collapse

Class Method Details

.invalid?(phone, country_code: StupidSMS.configuration.country_code) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/stupid_sms/phone.rb', line 7

def self.invalid?(phone, country_code: StupidSMS.configuration.country_code)
  GlobalPhone.validate(phone, country_code) ? false : true
end

.normalize(phone, country_code: StupidSMS.configuration.country_code) ⇒ Object



11
12
13
# File 'lib/stupid_sms/phone.rb', line 11

def self.normalize(phone, country_code: StupidSMS.configuration.country_code)
  GlobalPhone.normalize(phone, country_code)
end