Sha256: 815fec38eabc7b9626b57b8562fad1c6f698be1bb8a80a336441c2768140e679

Contents?: true

Size: 752 Bytes

Versions: 1

Compression:

Stored size: 752 Bytes

Contents

# frozen_string_literal: true

module FFakerTW
  module AddressDA
    include FFakerTW::Address

    extend ModuleUtils
    extend self

    REGION = %w[Hovedstaden Sjælland Syddanmark Midtjylland Nordjylland].freeze
    STATE = REGION

    def zip_code
      FFakerTW.numerify('####')
    end

    def post_nr
      zip_code
    end

    def state
      kommune
    end

    def kommune
      fetch_sample(KOMMUNE)
    end

    def region
      fetch_sample(REGION)
    end

    def city
      fetch_sample(CITY)
    end

    def street_name
      fetch_sample(STREET)
    end

    def street_address
      "#{street_name} #{rand(0..99)}"
    end

    def full_address
      "#{street_address} #{post_nr} #{city} #{region} DANMARK"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffakerTW-0.1.0 lib/ffakerTW/address_da.rb