Module: FFaker::PhoneNumberUA

Extended by:
ModuleUtils, PhoneNumberUA
Included in:
PhoneNumberUA
Defined in:
lib/ffaker/phone_number_ua.rb

Constant Summary collapse

LOCAL_PREFIX =
'0'
COUNTRY_PREFIX =
'+380 '
PHONE_NUMBER =
' ###-####'

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#home_phone_numberObject



16
17
18
# File 'lib/ffaker/phone_number_ua.rb', line 16

def home_phone_number
  local_number(HOME_PHONE_PREFIXES)
end

#international_home_phone_numberObject



24
25
26
# File 'lib/ffaker/phone_number_ua.rb', line 24

def international_home_phone_number
  international_number(HOME_PHONE_PREFIXES)
end

#international_mobile_phone_numberObject



28
29
30
# File 'lib/ffaker/phone_number_ua.rb', line 28

def international_mobile_phone_number
  international_number(MOBILE_PHONE_PREFIXES)
end

#mobile_phone_numberObject



20
21
22
# File 'lib/ffaker/phone_number_ua.rb', line 20

def mobile_phone_number
  local_number(MOBILE_PHONE_PREFIXES)
end

#phone_numberObject



12
13
14
# File 'lib/ffaker/phone_number_ua.rb', line 12

def phone_number
  rand(0..1).zero? ? home_phone_number : mobile_phone_number
end