Sha256: 2393999246ffccc66a02131a11b8d97f35f1de37a3421b6b72aecf0013f43801
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true module FFakerTW # List of countries is from Freebase: # https://www.googleapis.com/freebase/v1/mqlread?lang=/lang/fi&query=[%7B%22name%22:null,%22type%22:%22/location/country%22%7D] # Streetnames are from areacode 32100 (http://posti.fi/postipalvelee/tyokalut/postinumerohaku/) # List of cities is from http://fi.wikipedia.org/wiki/Luettelo_Suomen_kaupungeista module AddressFI include FFakerTW::Address extend ModuleUtils extend self STREET_NBR_FORMATS = ['##', '#', '# a', '# b', '###', '# a #', '# b #'].freeze def zip_code FFakerTW.numerify('#####') end def city fetch_sample(CITY) end def street_name fetch_sample(STREET) end def street_address "#{street_name} #{street_nbr}" end def street_nbr FFakerTW.numerify(fetch_sample(STREET_NBR_FORMATS)) end def full_address "#{street_address}, #{zip_code} #{city}, SUOMI" end def random_country fetch_sample(COUNTRIES) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ffakerTW-0.1.0 | lib/ffakerTW/address_fi.rb |