Module: Faker::AddressNL
Constant Summary
collapse
- POSTAL_CODE_FORMAT =
['#### ??']
Constants included
from Address
Faker::Address::CITY_PREFIXES, Faker::Address::COMPASS_DIRECTIONS, Faker::Address::SEC_ADDR
Instance Method Summary
collapse
const_missing, k, underscore
Methods included from Address
#building_number, #city_prefix, #city_suffix, #country, #country_code, #neighborhood, #secondary_address, #street_address, #street_suffix, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr
Instance Method Details
#city ⇒ Object
35
36
37
|
# File 'lib/ffaker/address_nl.rb', line 35
def city
CITY.sample
end
|
#postal_code ⇒ Object
14
15
16
|
# File 'lib/ffaker/address_nl.rb', line 14
def postal_code
Faker.bothify POSTAL_CODE_FORMAT
end
|
#province ⇒ Object
39
40
41
|
# File 'lib/ffaker/address_nl.rb', line 39
def province
PROVINCE.sample
end
|
#street_name ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/ffaker/address_nl.rb', line 22
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
|
#zip_code ⇒ Object
18
19
20
|
# File 'lib/ffaker/address_nl.rb', line 18
def zip_code
postal_code
end
|