Module: FFaker::AddressFR
Constant Summary
collapse
- NUM =
['#', '##', '##', '###', '####', '#-##'].freeze
- MOD =
[' B', ' T', ' Q', ' BIS', ' TER', ' QUATER', '', '', '', ''].freeze
- SEP =
[', ', ' '].freeze
- TYPE =
%w[rue avenue av boulevard bd impasse].freeze
- POSTAL_CODE_FORMATS =
['#####', '97###', '2A###', '2B###'].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_name, #street_suffix, #time_zone, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr, #zip_code
Instance Method Details
#city ⇒ Object
28
29
30
|
# File 'lib/ffaker/address_fr.rb', line 28
def city
fetch_sample(CITY)
end
|
#full_address ⇒ Object
32
33
34
|
# File 'lib/ffaker/address_fr.rb', line 32
def full_address
%(#{street_address}#{fetch_sample(SEP)}#{postal_code} #{fetch_sample(CITY)})
end
|
#postal_code ⇒ Object
24
25
26
|
# File 'lib/ffaker/address_fr.rb', line 24
def postal_code
FFaker.numerify(fetch_sample(POSTAL_CODE_FORMATS))
end
|
#region ⇒ Object
36
37
38
|
# File 'lib/ffaker/address_fr.rb', line 36
def region
fetch_sample(REGION)
end
|
#street_address ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/ffaker/address_fr.rb', line 16
def street_address
FFaker.numerify(fetch_sample(NUM)) +
fetch_sample(MOD) +
fetch_sample(SEP) +
fetch_sample(TYPE) + ' ' +
FFaker::NameFR.name
end
|