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
26
27
28
|
# File 'lib/ffaker/address_fr.rb', line 26
def city
fetch_sample(CITY)
end
|
#full_address ⇒ Object
30
31
32
|
# File 'lib/ffaker/address_fr.rb', line 30
def full_address
%(#{street_address}#{fetch_sample(SEP)}#{postal_code} #{fetch_sample(CITY)})
end
|
#postal_code ⇒ Object
22
23
24
|
# File 'lib/ffaker/address_fr.rb', line 22
def postal_code
FFaker.numerify(fetch_sample(POSTAL_CODE_FORMATS))
end
|
#region ⇒ Object
34
35
36
|
# File 'lib/ffaker/address_fr.rb', line 34
def region
fetch_sample(REGION)
end
|
#street_address ⇒ Object
16
17
18
19
20
|
# 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}\n TEXT\nend\n".chomp
|