Module: FFaker::AddressFI

Extended by:
AddressFI, ModuleUtils
Includes:
Address
Included in:
AddressFI
Defined in:
lib/ffaker/address_fi.rb

Overview

Constant Summary collapse

ZIP_FORMATS =
['#####']
STREET_NBR_FORMATS =
['##', '#', '# a', '# b', '###', '# a #', '# b #']

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_prefix, #city_suffix, #country, #country_code, #neighborhood, #secondary_address, #street_suffix, #time_zone, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr

Instance Method Details

#cityObject



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

def city
  CITY.sample
end

#full_addressObject



39
40
41
# File 'lib/ffaker/address_fi.rb', line 39

def full_address
  "#{street_address}, #{zip_code} #{city}, SUOMI"
end

#random_countryObject



43
44
45
# File 'lib/ffaker/address_fi.rb', line 43

def random_country
  COUNTRIES.sample
end

#street_addressObject



31
32
33
# File 'lib/ffaker/address_fi.rb', line 31

def street_address
  "#{street_name} #{street_nbr}"
end

#street_nameObject



27
28
29
# File 'lib/ffaker/address_fi.rb', line 27

def street_name
  STREET.sample
end

#street_nbrObject



35
36
37
# File 'lib/ffaker/address_fi.rb', line 35

def street_nbr
  FFaker.numerify STREET_NBR_FORMATS.sample
end

#zip_codeObject



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

def zip_code
  FFaker.numerify ZIP_FORMATS.sample
end