Module: FFaker::AddressFR
- Extended by:
- AddressFR, ModuleUtils
- Includes:
- Address
- Included in:
- AddressFR
- Defined in:
- lib/ffaker/address_fr.rb
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
- #city ⇒ Object
- #full_address ⇒ Object
- #postal_code ⇒ Object
- #region ⇒ Object
- #street_address ⇒ Object
Methods included from ModuleUtils
const_missing, k, luhn_check, underscore, unique
Methods included from RandomUtils
#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 |