Module: FFaker::PhoneNumberMX
- Extended by:
- ModuleUtils, PhoneNumberMX
- Included in:
- PhoneNumberMX
- Defined in:
- lib/ffaker/phone_number_mx.rb
Instance Method Summary collapse
- #country_code ⇒ Object
-
#home_work_phone_number ⇒ Object
Generates a general phone number xx xxxx xxxx.
- #international_home_work_phone_number ⇒ Object
- #international_mobile_phone_number ⇒ Object
- #international_phone_number ⇒ Object
-
#mobile_phone_number ⇒ Object
Generates a mobile phone number 044 xx xxxx xxxx.
-
#phone_number ⇒ Object
generates mobile or home/work number.
-
#toll_free_number ⇒ Object
Generates a toll-free number 01 800 xxx xxxx.
Methods included from ModuleUtils
const_missing, k, luhn_check, underscore, unique
Methods included from RandomUtils
#fetch_sample, #rand, #shuffle
Instance Method Details
#country_code ⇒ Object
30 31 32 |
# File 'lib/ffaker/phone_number_mx.rb', line 30 def country_code '+52' end |
#home_work_phone_number ⇒ Object
Generates a general phone number
xx xxxx xxxx
11 12 13 |
# File 'lib/ffaker/phone_number_mx.rb', line 11 def home_work_phone_number FFaker.numerify('## #### ####') end |
#international_home_work_phone_number ⇒ Object
38 39 40 |
# File 'lib/ffaker/phone_number_mx.rb', line 38 def international_home_work_phone_number FFaker.numerify("#{country_code} ## #### ####") end |
#international_mobile_phone_number ⇒ Object
34 35 36 |
# File 'lib/ffaker/phone_number_mx.rb', line 34 def international_mobile_phone_number FFaker.numerify("#{country_code} 1 ## #### ####") end |
#international_phone_number ⇒ Object
42 43 44 45 46 47 |
# File 'lib/ffaker/phone_number_mx.rb', line 42 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 |
#mobile_phone_number ⇒ Object
Generates a mobile phone number 044 xx xxxx xxxx
18 19 20 |
# File 'lib/ffaker/phone_number_mx.rb', line 18 def mobile_phone_number FFaker.numerify('044 ## #### ####') end |
#phone_number ⇒ Object
generates mobile or home/work number
23 24 25 26 27 28 |
# File 'lib/ffaker/phone_number_mx.rb', line 23 def phone_number case rand(0..1) when 0 then home_work_phone_number when 1 then mobile_phone_number end end |