Module: FFaker::AddressNL
Constant Summary
Constants included
from Address
FFaker::Address::CITY_PREFIXES, FFaker::Address::COMPASS_DIRECTIONS, FFaker::Address::SEC_ADDR
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
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
#city ⇒ Object
23
24
25
|
# File 'lib/ffaker/address_nl.rb', line 23
def city
fetch_sample(CITY)
end
|
#postal_code ⇒ Object
10
11
12
|
# File 'lib/ffaker/address_nl.rb', line 10
def postal_code
FFaker::String.from_regexp(/[1-9]\d{3} [A-RT-Z][A-Z]/)
end
|
#province ⇒ Object
27
28
29
|
# File 'lib/ffaker/address_nl.rb', line 27
def province
fetch_sample(PROVINCE)
end
|
#street_name ⇒ Object
18
19
20
21
|
# File 'lib/ffaker/address_nl.rb', line 18
def street_name
name = fetch_sample([true, false]) ? NameNL.last_name : NameNL.first_name
name + random_type_of_street
end
|
#zip_code ⇒ Object
14
15
16
|
# File 'lib/ffaker/address_nl.rb', line 14
def zip_code
postal_code
end
|