Class: Faker::PhoneNumber

Inherits:
Object show all
Defined in:
lib/gems/faker-0.3.1/lib/faker/phone_number.rb

Constant Summary collapse

Formats =
[
   '###-###-####',
	'(###)###-####',
	'1-###-###-####',
	'###.###.####',
	'###-###-####',
	'(###)###-####',
	'1-###-###-####',
	'###.###.####',
	'###-###-#### x###',
	'(###)###-#### x###',
	'1-###-###-#### x###',
	'###.###.#### x###',
	'###-###-#### x####',
	'(###)###-#### x####',
	'1-###-###-#### x####',
	'###.###.#### x####',
	'###-###-#### x#####',
	'(###)###-#### x#####',
	'1-###-###-#### x#####',
	'###.###.#### x#####'
]

Class Method Summary collapse

Class Method Details

.phone_numberObject



4
5
6
# File 'lib/gems/faker-0.3.1/lib/faker/phone_number.rb', line 4

def phone_number
  Faker.numerify(Formats.rand)
end