Sha256: f0b7f92102a26e2384826aa59d3f6b97a358b217599c5607d848ea9014a6fe12

Contents?: true

Size: 802 Bytes

Versions: 2

Compression:

Stored size: 802 Bytes

Contents

# encoding: utf-8

require 'ffakerer/address'

module Faker
  module AddressDA
    include Faker::Address

    extend ModuleUtils
    extend self

    def zip_code
      Faker.numerify ZIP_FORMATS.rand
    end

    def post_nr
      zip_code
    end

    def state
      kommune
    end

    def kommune
      KOMMUNE.rand
    end

    def region
      REGION.rand
    end

    def city
      CITY.rand
    end

    ZIP_FORMATS = k ['####']

    def street_name
      STREET.rand
    end

    def street_address
      "#{Faker::AddressDA.street_address} #{rand(100)}"
    end

    def full_address
      %Q{#{street_address} #{post_nr} #{city} #{region} DANMARK}
    end

    REGION = k [
      'Hovedstaden', 'Sjælland', 'Syddanmark', 'Midtjylland', 'Nordjylland'
    ]

    STATE = REGION
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ffakerer-1.0.2 lib/ffakerer/address_da.rb
ffakerer-1.0.1 lib/ffakerer/address_da.rb