Module: Faker::AddressDE
Constant Summary
collapse
- ZIP_FORMATS =
k ['#####']
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
20
21
22
|
# File 'lib/ffakerer/address_de.rb', line 20
def city
CITY.rand
end
|
#state ⇒ Object
16
17
18
|
# File 'lib/ffakerer/address_de.rb', line 16
def state
STATE.rand
end
|
#street_address ⇒ Object
36
37
38
|
# File 'lib/ffakerer/address_de.rb', line 36
def street_address
"#{street_name} #{1+rand(192)}"
end
|
#street_name ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/ffakerer/address_de.rb', line 24
def street_name
case rand(2)
when 0 then "#{NameDE.last_name}"
when 1 then "#{NameDE.first_name}"
end << case rand(20)
when 0 then "weg"
when 1 then "gasse"
when 3 then "hain"
else "str."
end
end
|