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']
POSTCODE =
['??# #??', '??## #??']

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, underscore

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


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

def country
  COUNTRY.sample
end

#countyObject


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

def county
  COUNTY.sample
end

#postcodeObject


23
24
25
# File 'lib/ffaker/address_uk.rb', line 23

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