Class: Teodoro::CNPJ::RaizSufixo

Inherits:
Object
  • Object
show all
Defined in:
lib/teodoro/cnpj.rb

Defined Under Namespace

Classes: Numero

Instance Method Summary collapse

Instance Method Details

#cnpjObject



30
31
32
# File 'lib/teodoro/cnpj.rb', line 30

def cnpj
  "#{string}#{dv}"
end

#dvObject



34
35
36
37
38
# File 'lib/teodoro/cnpj.rb', line 34

def dv
  Numero.new(string).dv.then do |dv|
    dv + Numero.new(string + dv).dv
  end
end