Module: FFaker::PhoneNumberIT
Constant Summary
collapse
- COUNTRY_PREFIX =
['+39', '0039', '+39 ', '0039 '].freeze
- PHONE_NUMBER =
['######', '########'].freeze
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
Instance Method Details
#home_phone_number ⇒ Object
19
20
21
|
# File 'lib/ffaker/phone_number_it.rb', line 19
def home_phone_number
number HOME_PHONE_PREFIXES
end
|
#mobile_phone_number ⇒ Object
23
24
25
|
# File 'lib/ffaker/phone_number_it.rb', line 23
def mobile_phone_number
number MOBILE_PHONE_PREFIXES
end
|
#phone_number ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/ffaker/phone_number_it.rb', line 11
def phone_number
if rand(0..1) == 1
home_phone_number
else
mobile_phone_number
end
end
|