Sha256: 8b678933fea3b9bf3fa7b7a2e22013fabbbc5778edad039722afd7fd7e0cf36e

Contents?: true

Size: 609 Bytes

Versions: 3

Compression:

Stored size: 609 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

require 'ffaker/address'

module FFaker
  module AddressID
    include FFaker::Address

    extend ModuleUtils
    extend self

    STREET_PREFIX = %w(Jl Jln).freeze

    def zip_code
      FFaker.numerify '#####'
    end

    def state
      fetch_sample(STATE)
    end

    def state_abbr
      fetch_sample(STATE_ABBR)
    end

    def city
      fetch_sample(CITY)
    end

    def street_prefix
      fetch_sample(STREET_PREFIX)
    end

    def street
      "#{street_prefix}. #{fetch_sample(COMMON_STREET_NAMES)}, No. #{rand(1..100)}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffaker-2.6.0 lib/ffaker/address_id.rb
ffaker-2.5.0 lib/ffaker/address_id.rb
ffaker-2.4.0 lib/ffaker/address_id.rb