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 =
['######'].freeze
STREET_NBR_FORMATS =
%w[## # ###].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_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



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

def city
  fetch_sample(CITY)
end

#provinceObject



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

def province
  fetch_sample(PROVINCE)
end

#street_addressObject



29
30
31
# File 'lib/ffaker/address_ru.rb', line 29

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

#street_nameObject



25
26
27
# File 'lib/ffaker/address_ru.rb', line 25

def street_name
  fetch_sample(STREET)
end

#street_numberObject



33
34
35
# File 'lib/ffaker/address_ru.rb', line 33

def street_number
  FFaker.numerify(STREET_NBR_FORMATS)
end

#zip_codeObject



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

def zip_code
  FFaker.numerify(POSTAL_CODE_FORMAT)
end