Module: FFaker::AddressNL

Extended by:
AddressNL, ModuleUtils
Includes:
Address
Included in:
AddressNL
Defined in:
lib/ffaker/address_nl.rb

Constant Summary collapse

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

Constants included from Address

FFaker::Address::CITY_PREFIXES, FFaker::Address::COMPASS_DIRECTIONS, FFaker::Address::SEC_ADDR

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Methods included from Address

#building_number, #city_prefix, #city_suffix, #country, #country_code, #neighborhood, #secondary_address, #street_address, #street_suffix, #time_zone, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr

Instance Method Details

#cityObject


27
28
29
# File 'lib/ffaker/address_nl.rb', line 27

def city
  CITY.sample
end

#postal_codeObject


14
15
16
# File 'lib/ffaker/address_nl.rb', line 14

def postal_code
  FFaker.bothify POSTAL_CODE_FORMAT
end

#provinceObject


31
32
33
# File 'lib/ffaker/address_nl.rb', line 31

def province
  PROVINCE.sample
end

#street_nameObject


22
23
24
25
# File 'lib/ffaker/address_nl.rb', line 22

def street_name
  name = [true, false].sample ? NameNL.last_name : NameNL.first_name
  name + random_type_of_street
end

#zip_codeObject


18
19
20
# File 'lib/ffaker/address_nl.rb', line 18

def zip_code
  postal_code
end