module FFaker::AddressPL

Inspirations: TERYT registry, available at: www.stat.gov.pl/broker/access/index.jspa

Constants

SQUARE_PREFIXES
STREET_PREFIXES

Public Instance Methods

city() click to toggle source
# File lib/ffaker/address_pl.rb, line 54
def city
  fetch_sample(CITY)
end
full_address(include_country = false, include_secondary = false) click to toggle source

Full Polish address with country name in French (according to Universal Postal Union).

# File lib/ffaker/address_pl.rb, line 14
def full_address(include_country = false, include_secondary = false)
  address = "#{street_address(include_secondary)} #{postal_code} #{city}"
  address = "#{address} POLOGNE" if include_country
  address
end
postal_code()
Alias for: zip_code
province()
Alias for: voivodeship
square() click to toggle source
# File lib/ffaker/address_pl.rb, line 34
def square
  "#{square_prefix} #{fetch_sample(SQUARE)}"
end
square_prefix() click to toggle source
# File lib/ffaker/address_pl.rb, line 79
def square_prefix
  fetch_sample(SQUARE_PREFIXES)
end
state()
Alias for: voivodeship
street() click to toggle source
# File lib/ffaker/address_pl.rb, line 30
def street
  "#{street_prefix} #{fetch_sample(STREET)}"
end
street_address(include_secondary = false) click to toggle source
# File lib/ffaker/address_pl.rb, line 20
def street_address(include_secondary = false)
  address = "#{street_name} #{building_number}"
  address = "#{address}#{secondary_number}" if include_secondary
  address
end
street_name() click to toggle source
# File lib/ffaker/address_pl.rb, line 26
def street_name
  fetch_sample([street, square])
end
street_prefix() click to toggle source
# File lib/ffaker/address_pl.rb, line 75
def street_prefix
  fetch_sample(STREET_PREFIXES)
end
voivodeship() click to toggle source

A voivodeship is an administrative area in Poland - a Polish equivalent of state.

# File lib/ffaker/address_pl.rb, line 39
def voivodeship
  fetch_sample(VOIVODESHIP)
end
Also aliased as: state, province
voivodeship_abbr() click to toggle source
# File lib/ffaker/address_pl.rb, line 46
def voivodeship_abbr
  fetch_sample(VOIVODESHIP_ABBR)
end
voivodeship_capital_city() click to toggle source
# File lib/ffaker/address_pl.rb, line 50
def voivodeship_capital_city
  fetch_sample(VOIVODESHIP_CAPITAL_CITY)
end
zip_code() click to toggle source
# File lib/ffaker/address_pl.rb, line 69
def zip_code
  FFaker.numerify('##-###')
end
Also aliased as: postal_code