Module: FFaker::AddressRU

Extended by:
AddressRU, ModuleUtils
Includes:
Address
Included in:
AddressRU
Defined in:
lib/ffaker/address_ru.rb

Constant Summary collapse

POSTAL_CODE_FORMAT =
['######']
STREET_NBR_FORMATS =
%w(## # ###)

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



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

def city
  CITY.sample
end

#provinceObject



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

def province
  PROVINCE.sample
end

#street_addressObject



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

def street_address
  "#{street_name}, ะด. #{street_number}"
end

#street_nameObject



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

def street_name
  STREET.sample
end

#street_numberObject



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

def street_number
  FFaker.numerify(STREET_NBR_FORMATS)
end

#zip_codeObject



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

def zip_code
  FFaker.numerify(POSTAL_CODE_FORMAT)
end