Class: DetranFaker::Habilitacao::CNH
- Inherits:
-
Object
- Object
- DetranFaker::Habilitacao::CNH
- Defined in:
- lib/detran_faker/habilitacao/cnh.rb
Overview
Module responsible for generating fake information that simulates a national driver’s license.
Class Method Summary collapse
Class Method Details
.numero_espelho ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/detran_faker/habilitacao/cnh.rb', line 38 def numero_espelho numero_espelho = Habilitacao.random_non_zero_digit 9.times do numero_espelho = numero_espelho.dup.concat Habilitacao.random_single_digit end numero_espelho end |
.numero_formulario_renach ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/detran_faker/habilitacao/cnh.rb', line 48 def numero_formulario_renach renach = Habilitacao.random_state_initials 9.times do renach = renach.dup.concat Habilitacao.random_single_digit end renach end |
.numero_registro_nacional ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/detran_faker/habilitacao/cnh.rb', line 29 def numero_registro_nacional cnh_number = Habilitacao.random_non_zero_digit 10.times do cnh_number = cnh_number.dup.concat Habilitacao.random_single_digit end cnh_number end |