Module: CpfCnpj

Defined in:
lib/cpf_cnpj.rb,
lib/cpf_cnpj/cli.rb,
lib/cpf_cnpj/version.rb

Defined Under Namespace

Classes: CLI

Constant Summary collapse

VERSION =
"1.1.0"

Class Method Summary collapse

Class Method Details

.which(input) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/cpf_cnpj.rb', line 11

def self.which(input)
  if CPF.valid?(input)
    CPF.new(input)
  elsif CNPJ.valid?(input)
    CNPJ.new(input)
  end
end