class Faker::PhoneNumber

Public Class Methods

cell_phone() click to toggle source
# 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() click to toggle source
# File lib/faker/phone_number.rb, line 4
def phone_number
  numerify(fetch('phone_number.formats'))
end