class Faker::DrivingLicence
def british_driving_licence(legacy_last_name = NOT_GIVEN, legacy_initials = NOT_GIVEN, legacy_gender = NOT_GIVEN, legacy_date_of_birth = NOT_GIVEN, last_name: Faker::Name.last_name, initials: Faker::Name.initials, gender: random_gender, date_of_birth: Faker::Date.birthday(min_age: 18, max_age: 65))
-
(String)
-
Parameters:
-
date_of_birth
(String
) -- The date of birth of the driving licence's owner. -
gender
(String
) -- The gender of the driving licence's owner. -
initials
(String
) -- The initials of the driving licence's owner. -
last_name
(String
) -- The last name of the driving licence's owner.
def british_driving_licence(legacy_last_name = NOT_GIVEN, legacy_initials = NOT_GIVEN, legacy_gender = NOT_GIVEN, legacy_date_of_birth = NOT_GIVEN, last_name: Faker::Name.last_name, initials: Faker::Name.initials, gender: random_gender, date_of_birth: Faker::Date.birthday(min_age: 18, max_age: 65)) warn_for_deprecated_arguments do |keywords| keywords << :last_name if legacy_last_name != NOT_GIVEN keywords << :initials if legacy_initials != NOT_GIVEN keywords << :gender if legacy_gender != NOT_GIVEN keywords << :date_of_birth if legacy_date_of_birth != NOT_GIVEN end [ gb_licence_padding(last_name, 5), gb_licence_year(date_of_birth, gender), gb_licence_padding(initials, 2), gb_licence_checksum ].join end