module FFaker::IdentificationESCO
Constants
- BLOOD_TYPE
- LICENSE_CATEGORY
Public Instance Methods
blood_type()
click to toggle source
# File lib/ffaker/identification_es_co.rb, line 29 def blood_type sign = fetch_sample(%w[+ -]) "#{fetch_sample(BLOOD_TYPE)}#{sign}" end
driver_license_category()
click to toggle source
# File lib/ffaker/identification_es_co.rb, line 22 def driver_license_category category = fetch_sample(LICENSE_CATEGORY) # the categories are A1 A2 B1 B2 B3 C1 C2 C3 num = category == 'A' ? rand(1..2) : rand(1..3) "#{category}#{num}" end
drivers_license()
click to toggle source
# File lib/ffaker/identification_es_co.rb, line 15 def drivers_license how_many_numbers = rand(6..13) FFaker.numerify('#' * how_many_numbers) end
Also aliased as: id
expedition_date()
click to toggle source
# File lib/ffaker/identification_es_co.rb, line 34 def expedition_date today = ::Date.today today - rand(today.year) end