Class: Faker::Medical::Patient

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/medical/patient.rb

Class Method Summary collapse

Class Method Details

.date_of_birthObject Also known as: dob



7
8
9
10
# File 'lib/faker/medical/patient.rb', line 7

def date_of_birth
  ::Time.random(:year_range => 80)
  #Date.parse("#{rand(12) + 1}/#{rand(27) + 1}/19#{format("%02d", rand(99))}" )
end

.genderObject



13
14
15
# File 'lib/faker/medical/patient.rb', line 13

def gender
  %w[M F].sample
end

.phone_numberObject



17
18
19
# File 'lib/faker/medical/patient.rb', line 17

def phone_number
  Faker::PhoneNumber.phone_number
end