Sha256: 3c19d221e341f8aeaadf159c3ef5a6d1b91859a442997f93c5663282dd6eb1f6
Contents?: true
Size: 266 Bytes
Versions: 3
Compression:
Stored size: 266 Bytes
Contents
class CPF class Generator NUMBERS = [*0..9].freeze def self.generate numbers = 9.times.map { NUMBERS.sample } numbers << VerifierDigit.generate(numbers) numbers << VerifierDigit.generate(numbers) numbers.join("") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cpf_cnpj-0.2.1 | lib/cpf/generator.rb |
cpf_cnpj-0.2.0 | lib/cpf/generator.rb |
cpf_cnpj-0.1.0 | lib/cpf/generator.rb |