Module: FFaker::AddressDA
Constant Summary
collapse
- REGION =
%w[Hovedstaden Sjælland Syddanmark Midtjylland Nordjylland].freeze
- STATE =
REGION
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_suffix, #time_zone, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr
Instance Method Details
#city ⇒ Object
33
34
35
|
# File 'lib/ffaker/address_da.rb', line 33
def city
fetch_sample(CITY)
end
|
#full_address ⇒ Object
45
46
47
|
# File 'lib/ffaker/address_da.rb', line 45
def full_address
"#{street_address} #{post_nr} #{city} #{region} DANMARK"
end
|
#kommune ⇒ Object
25
26
27
|
# File 'lib/ffaker/address_da.rb', line 25
def kommune
fetch_sample(KOMMUNE)
end
|
#post_nr ⇒ Object
17
18
19
|
# File 'lib/ffaker/address_da.rb', line 17
def post_nr
zip_code
end
|
#region ⇒ Object
29
30
31
|
# File 'lib/ffaker/address_da.rb', line 29
def region
fetch_sample(REGION)
end
|
#state ⇒ Object
21
22
23
|
# File 'lib/ffaker/address_da.rb', line 21
def state
kommune
end
|
#street_address ⇒ Object
41
42
43
|
# File 'lib/ffaker/address_da.rb', line 41
def street_address
"#{street_name} #{rand(0..99)}"
end
|
#street_name ⇒ Object
37
38
39
|
# File 'lib/ffaker/address_da.rb', line 37
def street_name
fetch_sample(STREET)
end
|
#zip_code ⇒ Object
13
14
15
|
# File 'lib/ffaker/address_da.rb', line 13
def zip_code
FFaker.numerify('####')
end
|