Module: FFaker::IdentificationIT

Extended by:
IdentificationIT, ModuleUtils
Included in:
IdentificationIT
Defined in:
lib/ffaker/identification_it.rb

Constant Summary collapse

ETHNICITIES =
[
  'Afroamericano', 'Asiatico/isolano del Pacifico', 'Caucasico', 'Ispanico', 'Nativo americano',
  'Multirazziale', 'Altro', 'Preferisco non rispondere'
].freeze
GENDERS =
%w[Maschio Femmina].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_it.rb', line 14

def drivers_license
  FFaker::String.from_regexp(/U1[1-9]\d{7}[A-Z]/)
end

#ethnicityObject



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

def ethnicity
  fetch_sample(ETHNICITIES)
end

#genderObject



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

def gender
  fetch_sample(GENDERS)
end

#ssnObject



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

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