Method: FFaker::IdentificationESCL#rut
- Defined in:
- lib/ffaker/identification_es_cl.rb
#rut ⇒ Object
RUT is the Chilean ID, followed by format: XX.XXX.XXX - Y es.wikipedia.org/wiki/Rol_%C3%9Anico_Tributario
The last Y is a modulo 11 validation code. In the case the result is 10, it will be replaced by a ‘K’ character
14 15 16 17 18 |
# File 'lib/ffaker/identification_es_cl.rb', line 14 def rut # Rut is gonna be between 1.000.000 and 24.999.999 n = rand(1_000_000...25_000_000) "#{n}-#{dv(n)}" end |