Module: FFaker::AddressFI

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

Overview

Constant Summary collapse

STREET_NBR_FORMATS =
['##', '#', '# a', '# b', '###', '# a #', '# b #'].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, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

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


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

def city
  fetch_sample(CITY)
end

#full_addressObject


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

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

#random_countryObject


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

def random_country
  fetch_sample(COUNTRIES)
end

#street_addressObject


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

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

#street_nameObject


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

def street_name
  fetch_sample(STREET)
end

#street_nbrObject


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

def street_nbr
  FFaker.numerify(fetch_sample(STREET_NBR_FORMATS))
end

#zip_codeObject


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

def zip_code
  FFaker.numerify('#####')
end