Module: Faker::AddressDA
Constant Summary
collapse
- ZIP_FORMATS =
k ['####']
- REGION =
k [
'Hovedstaden', 'Sjælland', 'Syddanmark', 'Midtjylland', 'Nordjylland'
]
- STATE =
REGION
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, #neighborhood, #secondary_address, #street_suffix, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr
Instance Method Details
#city ⇒ Object
32
33
34
|
# File 'lib/ffakerer/address_da.rb', line 32
def city
CITY.rand
end
|
#full_address ⇒ Object
46
47
48
|
# File 'lib/ffakerer/address_da.rb', line 46
def full_address
%Q{#{street_address} #{post_nr} #{city} #{region} DANMARK}
end
|
#kommune ⇒ Object
24
25
26
|
# File 'lib/ffakerer/address_da.rb', line 24
def kommune
KOMMUNE.rand
end
|
#post_nr ⇒ Object
16
17
18
|
# File 'lib/ffakerer/address_da.rb', line 16
def post_nr
zip_code
end
|
#region ⇒ Object
28
29
30
|
# File 'lib/ffakerer/address_da.rb', line 28
def region
REGION.rand
end
|
#state ⇒ Object
20
21
22
|
# File 'lib/ffakerer/address_da.rb', line 20
def state
kommune
end
|
#street_address ⇒ Object
42
43
44
|
# File 'lib/ffakerer/address_da.rb', line 42
def street_address
"#{Faker::AddressDA.street_address} #{rand(100)}"
end
|
#street_name ⇒ Object
38
39
40
|
# File 'lib/ffakerer/address_da.rb', line 38
def street_name
STREET.rand
end
|