Module: FFaker::AddressJA
Constant Summary
collapse
- ZIP_FORMATS =
['###-####'].freeze
- LAND_NUMBER_FORMATS =
['#丁目#番#号', '###'].freeze
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_name, #street_suffix, #time_zone, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr, #zip_code
Instance Method Details
#address ⇒ Object
13
14
15
16
17
18
19
20
|
# File 'lib/ffaker/address_ja.rb', line 13
def address
fetch_sample([
"#{postal_code} #{prefecture}#{city}#{street}#{land_number}",
"#{postal_code} #{prefecture}#{county}#{street}#{land_number}",
"#{postal_code} #{prefecture}#{designated_city}#{ward}#{street}#{land_number}",
"#{postal_code} 東京都#{tokyo_ward}#{street}#{land_number}"
])
end
|
#city ⇒ Object
71
72
73
|
# File 'lib/ffaker/address_ja.rb', line 71
def city
fetch_sample(CITY)
end
|
#county ⇒ Object
75
76
77
|
# File 'lib/ffaker/address_ja.rb', line 75
def county
fetch_sample(COUNTY)
end
|
#designated_city ⇒ Object
67
68
69
|
# File 'lib/ffaker/address_ja.rb', line 67
def designated_city
fetch_sample(CITY)
end
|
#designated_city_address ⇒ Object
29
30
31
32
33
34
|
# File 'lib/ffaker/address_ja.rb', line 29
def designated_city_address
fetch_sample([
"#{postal_code} #{prefecture}#{designated_city}#{ward}#{street}#{land_number}"
])
end
|
#other_address ⇒ Object
22
23
24
25
26
27
|
# File 'lib/ffaker/address_ja.rb', line 22
def other_address
fetch_sample([
"#{postal_code} #{prefecture}#{city}#{street}#{land_number}",
"#{postal_code} #{prefecture}#{county}#{street}#{land_number}"
])
end
|
#prefecture ⇒ Object
79
80
81
|
# File 'lib/ffaker/address_ja.rb', line 79
def prefecture
fetch_sample(PREFECTURE)
end
|
#street ⇒ Object
51
52
53
|
# File 'lib/ffaker/address_ja.rb', line 51
def street
FFaker.numerify(fetch_sample(CITY))
end
|
#tokyo_ward ⇒ Object
55
56
57
|
# File 'lib/ffaker/address_ja.rb', line 55
def tokyo_ward
fetch_sample(TOKYO_WARD)
end
|
#tokyo_ward_address ⇒ Object
36
37
38
39
40
41
|
# File 'lib/ffaker/address_ja.rb', line 36
def tokyo_ward_address
fetch_sample([
"#{postal_code} 東京都#{tokyo_ward}#{street}#{land_number}"
])
end
|
#village ⇒ Object
63
64
65
|
# File 'lib/ffaker/address_ja.rb', line 63
def village
fetch_sample(VILLAGE)
end
|
#ward ⇒ Object
59
60
61
|
# File 'lib/ffaker/address_ja.rb', line 59
def ward
fetch_sample(WARD)
end
|