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