Module: Faker::AddressUK

Extended by:
AddressUK, ModuleUtils
Includes:
Address
Included in:
AddressUK
Defined in:
lib/ffaker/address_uk.rb

Constant Summary

COUNTRY =
k ['England', 'Scotland', 'Wales', 'Northern Ireland']
POSTCODE =
k ['??# #??', '??## #??']

Constants included from Address

Faker::Address::CITY_PREFIXES, Faker::Address::COMPASS_DIRECTIONS, Faker::Address::SEC_ADDR

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Methods included from Address

#building_number, #city, #city_prefix, #city_suffix, #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

#countryObject



16
17
18
# File 'lib/ffaker/address_uk.rb', line 16

def country
  COUNTRY.rand
end

#countyObject



12
13
14
# File 'lib/ffaker/address_uk.rb', line 12

def county
  COUNTY.rand
end

#postcodeObject



20
21
22
# File 'lib/ffaker/address_uk.rb', line 20

def postcode
  Faker.bothify(POSTCODE.rand).upcase
end