faker
faker copied to clipboard
Add ChileRut.full_formatted_rut
No-Story
Description:
In Chile, we have a RUT, kind of an ssn. The module written by oxfist was very nice and useful. But sometimes in Chile, we are asked to type RUT with a dot that separates the thousand and millions.
I've added the method .full_formatted_rut
which will generate a RUT string with its validator digit (called dv
on the code) and every three numbers it will have a dot separator. The example I'll write here is the same as it is written on the yard documentation of the new method.
Faker::ChileRut.full_formatted_rut #=> "30.686.957-4"
Faker::ChileRut.full_formatted_rut(min_rut: 20890156) #=> "30.686.957-4"
Faker::ChileRut.full_formatted_rut(min_rut: 30686957, fixed: true) #=> "30.686.957-4"
Anything you need I'll keep an eye on this PR.
Best regards,
Karl