Module: FFaker::Identification

Extended by:
Identification, ModuleUtils
Included in:
Identification
Defined in:
lib/ffaker/identification.rb

Constant Summary collapse

ETHNICITIES =
[
  'African American', 'Asian/Pacific Islander', 'Caucasian', 'Hispanic', 'Native American',
  'Multiracial', 'Other', 'Prefer not to respond'
].freeze
GENDERS =
%w[Male Female].freeze

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#drivers_licenseObject



14
15
16
# File 'lib/ffaker/identification.rb', line 14

def drivers_license
  FFaker.bothify('?###-###-##-###-#').upcase
end

#ethnicityObject



22
23
24
# File 'lib/ffaker/identification.rb', line 22

def ethnicity
  fetch_sample(ETHNICITIES)
end

#genderObject



26
27
28
# File 'lib/ffaker/identification.rb', line 26

def gender
  fetch_sample(GENDERS)
end

#ssnObject



18
19
20
# File 'lib/ffaker/identification.rb', line 18

def ssn
  FFaker.numerify('###-##-####')
end