Sha256: fad2b07f7ffcf98f11f2e9bc88e555c06ceb2e6bae693341d66d6e938ae75f43

Contents?: true

Size: 591 Bytes

Versions: 6

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true

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

6 entries across 6 versions & 1 rubygems

Version Path
ffaker-2.17.0 lib/ffaker/address_id.rb
ffaker-2.16.0 lib/ffaker/address_id.rb
ffaker-2.15.0 lib/ffaker/address_id.rb
ffaker-2.14.0 lib/ffaker/address_id.rb
ffaker-2.13.0 lib/ffaker/address_id.rb
ffaker-2.12.0 lib/ffaker/address_id.rb