module FFaker::PhoneNumberRU
Constants
- COUNTRY_PREFIX
- INTERNATIONAL_COUNTRY_PREFIX
- TOLL_FREE_PREFIX
Public Instance Methods
country_code()
click to toggle source
Internal country code
8
# File lib/ffaker/phone_number_ru.rb, line 92 def country_code COUNTRY_PREFIX end
home_work_phone_number()
click to toggle source
Generate home or work phone number with internal country code
8 011 232 22 22 8 836 331 23 12
# File lib/ffaker/phone_number_ru.rb, line 70 def home_work_phone_number build_phone_number(country_code, home_work_phone_prefix) end
home_work_phone_prefix()
click to toggle source
Home or work phone prefix
081 301
# File lib/ffaker/phone_number_ru.rb, line 100 def home_work_phone_prefix fetch_sample(HOME_PHONE_PREFIXES) end
international_country_code()
click to toggle source
International country code
+7
# File lib/ffaker/phone_number_ru.rb, line 85 def international_country_code INTERNATIONAL_COUNTRY_PREFIX end
international_home_work_phone_number()
click to toggle source
Generate home or work phone number with international country code
+7 842 933 24 99 +7 851 921 35 92
# File lib/ffaker/phone_number_ru.rb, line 35 def international_home_work_phone_number build_phone_number(international_country_code, home_work_phone_prefix) end
international_mobile_phone_number()
click to toggle source
Generate mobile phone number with international country code
+7 929 933 24 99 +7 978 921 35 92
# File lib/ffaker/phone_number_ru.rb, line 27 def international_mobile_phone_number build_phone_number(international_country_code, mobile_phone_prefix) end
international_phone_number()
click to toggle source
Generate general phone number with international country code
+7 929 933 24 99 +7 851 921 35 92
# File lib/ffaker/phone_number_ru.rb, line 16 def international_phone_number case rand(0..1) when 0 then international_mobile_phone_number when 1 then international_home_work_phone_number end end
international_toll_free_number()
click to toggle source
Generate toll free phone number with international country code
+7 800 413 01 33 +7 800 153 55 22
# File lib/ffaker/phone_number_ru.rb, line 43 def international_toll_free_number build_phone_number(international_country_code, TOLL_FREE_PREFIX) end
mobile_phone_number()
click to toggle source
Generate mobile phone number with internal country code
8 949 232 22 22 8 999 331 23 12
# File lib/ffaker/phone_number_ru.rb, line 62 def mobile_phone_number build_phone_number(country_code, mobile_phone_prefix) end
mobile_phone_prefix()
click to toggle source
Mobile phone prefix
929 978
# File lib/ffaker/phone_number_ru.rb, line 108 def mobile_phone_prefix fetch_sample(MOBILE_PHONE_PREFIXES) end
phone_number()
click to toggle source
Generate general phone number with internal country code
8 999 044 31 33 8 843 944 33 33
# File lib/ffaker/phone_number_ru.rb, line 51 def phone_number case rand(0..1) when 0 then mobile_phone_number when 1 then home_work_phone_number end end
toll_free_number()
click to toggle source
Generate toll free phone number with internal country code
8 800 413 01 33 8 800 153 55 22
# File lib/ffaker/phone_number_ru.rb, line 78 def toll_free_number build_phone_number(country_code, TOLL_FREE_PREFIX) end
Private Instance Methods
build_phone_number(country_code, prefix)
click to toggle source
Build phone number by country_code
and prefix
# File lib/ffaker/phone_number_ru.rb, line 116 def build_phone_number(country_code, prefix) "#{country_code} #{prefix} #{FFaker.numerify('###-##-##')}" end