Class: BrFaker::Cnpj
- Inherits:
-
Object
- Object
- BrFaker::Cnpj
- Extended by:
- CpfCnpj
- Defined in:
- lib/brfaker/cpf_cnpj/cnpj.rb
Constant Summary
Constants included from CpfCnpj
BrFaker::CpfCnpj::CNPJ_MASK, BrFaker::CpfCnpj::CPF_MASK
Class Method Summary collapse
Class Method Details
.cnpj(mask = true) ⇒ Object
8 9 10 11 12 |
# File 'lib/brfaker/cpf_cnpj/cnpj.rb', line 8 def cnpj(mask=true) number = generate_number(12, [9, 9]) return number unless mask number.apply_mask(CNPJ_MASK) end |