Sha256: 8b2c900b96d6c571e6e79ace462ea70b78821f49055b41d816498437c0cf2974

Contents?: true

Size: 685 Bytes

Versions: 3

Compression:

Stored size: 685 Bytes

Contents

# encoding: utf-8

require 'ffaker/address'

module FFaker
  module AddressNL
    include FFaker::Address

    extend ModuleUtils
    extend self

    POSTAL_CODE_FORMAT = ['#### ??']

    def postal_code
      FFaker.bothify POSTAL_CODE_FORMAT
    end

    def zip_code
      postal_code
    end

    def street_name
      case rand(2)
      when 0 then "#{NameNL.last_name}"
      when 1 then "#{NameNL.first_name}"
      end << case rand(20)
      when 0 then "weg"
      when 1 then "boulevard"
      when 3 then "pad"
      when 4 then "steeg"
      else "straat"
      end
    end

    def city
      CITY.sample
    end

    def province
      PROVINCE.sample
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffaker-2.2.0 lib/ffaker/address_nl.rb
ffaker-2.1.0 lib/ffaker/address_nl.rb
ffaker-2.0.0 lib/ffaker/address_nl.rb