class Faker::PhoneNumber
def area_code
-
(String)-
def area_code fetch('phone_number.area_code') rescue I18n::MissingTranslationData nil end
def cell_phone
-
(String)-
def cell_phone parse('cell_phone.formats') end
def cell_phone_in_e164
-
(String)-
def cell_phone_in_e164 cell_phone_with_country_code.delete('^+0-9') end
def cell_phone_with_country_code
-
(String)-
def cell_phone_with_country_code "#{country_code} #{cell_phone}" end
def country_code
-
(String)-
def country_code "+#{fetch('country_code')}" end
def exchange_code
-
(String)-
def exchange_code fetch('phone_number.exchange_code') rescue I18n::MissingTranslationData nil end
def phone_number
-
(String)-
def phone_number parse('phone_number.formats') end
def phone_number_with_country_code
-
(String)-
def phone_number_with_country_code "#{country_code} #{phone_number}" end
def subscriber_number(length: 4)
-
(String)-
Parameters:
-
length(Integer) -- Specifies the length of the return value.
def subscriber_number(length: 4) rand.to_s[2..(1 + length)] end