Module: Faker::AddressUK

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

Constant Summary collapse

UK_COUNTRY =
k ['England', 'Scotland', 'Wales', 'Northern Ireland']
UK_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, #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/ffakerer/address_uk.rb', line 16

def country
  UK_COUNTRY.rand
end

#countyObject



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

def county
  UK_COUNTY.rand
end

#postcodeObject



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

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