Sha256: eba554198049af1fe86e632cd2e13692a2bfd0ddfc2e0be25d03f21f99191aee

Contents?: true

Size: 612 Bytes

Versions: 1

Compression:

Stored size: 612 Bytes

Contents

require 'faker'

module Aamva
  class Generator
    def self.dcg
      DCG_MAPPING.keys.sample
    end

    # Customer ID Number

    def self.daq
      chars = ('A'..'Z').to_a + (('0'..'9').to_a)

      chars.sample(25).join("")
    end

    # Physical Description – Eye Color

    def self.day
      DAY_MAPPING.keys.sample
    end

    def self.dac
      Faker::Name.first_name[0..MAX_DAC_LENGTH]
    end

    # Date of Birth

    def self.dbb
      Faker::Date.birthday.strftime("%Y%m%d")
    end

    # Document Issue Date

    def self.dbd
      Faker::Date.backward.strftime("%Y%m%d")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aamva-0.1.0 lib/aamva/generator.rb