Class: Faker::DrivingLicence
- Defined in:
- lib/faker/default/driving_licence.rb
Constant Summary collapse
- GB_PADDING =
'9999'
- NI_CHANCE =
NI Pop is about 3% of total UK population
0.03
Constants inherited from Base
Base::Letters, Base::Numbers, Base::ULetters
Class Method Summary collapse
- .british_driving_licence(last_name: Faker::Name.last_name, initials: Faker::Name.initials, gender: random_gender, date_of_birth: Faker::Date.birthday(18, 65)) ⇒ Object
- .northern_irish_driving_licence ⇒ Object
- .uk_driving_licence(*args) ⇒ Object
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale
Class Method Details
.british_driving_licence(last_name: Faker::Name.last_name, initials: Faker::Name.initials, gender: random_gender, date_of_birth: Faker::Date.birthday(18, 65)) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/faker/default/driving_licence.rb', line 9 def british_driving_licence(last_name: Faker::Name.last_name, initials: Faker::Name.initials, gender: random_gender, date_of_birth: Faker::Date.birthday(18, 65)) [ gb_licence_padding(last_name, 5), gb_licence_year(date_of_birth, gender), gb_licence_padding(initials, 2), gb_licence_checksum ].join end |