module Faker::IdentificationESCO
Constants
- BLOOD_TYPE
- LICENSE_CATEGORY
Public Instance Methods
blood_type()
click to toggle source
# File lib/ffakerer/identification_es_co.rb, line 27 def blood_type #RH sign = %w(+ -).shuffle.shift BLOOD_TYPE.rand.concat sign end
driver_license_category()
click to toggle source
# File lib/ffakerer/identification_es_co.rb, line 20 def driver_license_category category = LICENSE_CATEGORY.rand # the categories are A1 A2 B1 B2 B3 C1 C2 C3 num = category == 'A' ? 1 + rand(2) : 1 + rand(3) category.concat(num.to_s) end
drivers_license()
click to toggle source
# File lib/ffakerer/identification_es_co.rb, line 13 def drivers_license how_many_numbers = 6 + rand(8) Faker.numerify("#" * how_many_numbers) end
Also aliased as: id
expedition_date()
click to toggle source
# File lib/ffakerer/identification_es_co.rb, line 32 def expedition_date today = Date.today today - rand(today.year) end