Module: FFaker::AddressUK

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

Constant Summary collapse

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

Constants included from Address

FFaker::Address::CITY_PREFIXES, FFaker::Address::COMPASS_DIRECTIONS, FFaker::Address::SEC_ADDR

Instance Method Summary collapse

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, #city_prefix, #city_suffix, #country_code, #neighborhood, #secondary_address, #street_address, #street_name, #street_suffix, #time_zone, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr, #zip_code

Instance Method Details

#countryObject



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

def country
  fetch_sample(COUNTRY)
end

#countyObject



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

def county
  fetch_sample(COUNTY)
end

#postcodeObject



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

def postcode
  FFaker.bothify(fetch_sample(POSTCODE)).upcase
end