Class: Faker::PhoneNumber
- Inherits:
-
Base
- Object
- Base
- Faker::PhoneNumber
show all
- Defined in:
- lib/faker/phone_number.rb
Class Method Summary
collapse
Methods inherited from Base
bothify, fetch, flexible, letterify, method_missing, numerify, parse, translate
Class Method Details
.cell_phone ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/faker/phone_number.rb', line 8
def cell_phone
if (translation = translate(:faker)[:cell_phone]).is_a? Hash
numerify(translation[:formats].sample)
else
numerify(fetch('phone_number.formats'))
end
end
|
.phone_number ⇒ Object
4
5
6
|
# File 'lib/faker/phone_number.rb', line 4
def phone_number
numerify(fetch('phone_number.formats'))
end
|