Module: FFaker::PhoneNumberNL
Constant Summary
collapse
- COUNTRY_CODE =
'+31'
- AREA_CODE_PREFIX =
'0'
- PHONE_NUMBER =
{
2 => ['#######', '### ####', '#### ###'],
3 => ['######', '#### ##', '## ## ##']
}.freeze
- MOBILE_PHONE_NUMBER =
['########', ' ## ## ## ##', ' ### ### ##', ' #### ####'].freeze
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
Instance Method Details
#home_work_phone_number ⇒ Object
#international_home_work_phone_number ⇒ Object
37
38
39
40
|
# File 'lib/ffaker/phone_number_nl.rb', line 37
def international_home_work_phone_number
area = fetch_sample(AREA_CODES)
FFaker.numerify("#{COUNTRY_CODE} #{area}-#{fetch_sample(PHONE_NUMBER[area.size])}")
end
|
#international_mobile_phone_number ⇒ Object
#international_phone_number ⇒ Object
31
32
33
34
35
|
# File 'lib/ffaker/phone_number_nl.rb', line 31
def international_phone_number
return international_mobile_phone_number if rand(0..1).zero?
international_home_work_phone_number
end
|
#mobile_phone_number ⇒ Object
#phone_number ⇒ Object
16
17
18
19
20
|
# File 'lib/ffaker/phone_number_nl.rb', line 16
def phone_number
return home_work_phone_number if rand(0..1).zero?
mobile_phone_number
end
|