Module: Faker::AddressCA
Constant Summary
collapse
- POSTAL_CODE_FORMATS =
['?#? #?#']
- PROVINCE_ABBRS =
%w(NL NS PE NB QC ON MB SK AB BC YT NT NU)
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, #country_code, #neighborhood, #secondary_address, #street_address, #street_name, #street_suffix, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr, #zip_code
Instance Method Details
#city ⇒ Object
23
24
25
|
# File 'lib/ffaker/address_ca.rb', line 23
def city
CITY.sample
end
|
#postal_code ⇒ Object
15
16
17
|
# File 'lib/ffaker/address_ca.rb', line 15
def postal_code
Faker.bothify(POSTAL_CODE_FORMATS.sample).upcase
end
|
#province ⇒ Object
19
20
21
|
# File 'lib/ffaker/address_ca.rb', line 19
def province
PROVINCE.sample
end
|
#province_abbr ⇒ Object
27
28
29
|
# File 'lib/ffaker/address_ca.rb', line 27
def province_abbr
PROVINCE_ABBRS.sample
end
|