lib/forgery/forgery/address.rb in forgery-0.3.12 vs lib/forgery/forgery/address.rb in forgery-0.4.0
- old
+ new
@@ -7,11 +7,11 @@
# # => "Atwood"
#
# Forgery(:address).street_name
# # => "Fordem"
def self.street_name
- dictionaries[:streets].random
+ dictionaries[:streets].random.unextend
end
# Gets one of the formats from 'street_number_formats' and converts it to
# numbers.
#
@@ -30,11 +30,11 @@
# # => "Street"
#
# Forgery(:address).street_suffix
# # => "Parkway"
def self.street_suffix
- dictionaries[:street_suffixes].random
+ dictionaries[:street_suffixes].random.unextend
end
# Gets a full street address, including street number, street name, and
# street suffix.
#
@@ -53,55 +53,55 @@
# # => "Anaheim"
#
# Forgery(:address).city
# # => "Sacramento"
def self.city
- dictionaries[:cities].random
+ dictionaries[:cities].random.unextend
end
# Gets a random state out of the 'states' dictionary.
#
# Forgery(:address).state
# # => "Mississippi"
#
# Forgery(:address).state
# # => "Minnesota"
def self.state
- dictionaries[:states].random
+ dictionaries[:states].random.unextend
end
# Gets a random state abbreviation out of the 'state_abbrev' dictionary.
#
# Forgery(:address).state_abbrev
# # => "GA"
#
# Forgery(:address).state_abbrev
# # => "TX"
def self.state_abbrev
- dictionaries[:state_abbrevs].random
+ dictionaries[:state_abbrevs].random.unextend
end
# Gets a random Canadian province or territory out of the 'provinces' dictionary.
#
# Forgery(:address).province
# # => "Ontario"
#
# Forgery(:address).province
# # => "Northwest Territories"
def self.province
- dictionaries[:provinces].random
+ dictionaries[:provinces].random.unextend
end
# Gets a random Canadian province or territory abbreviation out of the 'province_abbrev' dictionary.
#
# Forgery(:address).province_abbrev
# # => "ON"
#
# Forgery(:address).province_abbrev
# # => "NT"
def self.province_abbrev
- dictionaries[:province_abbrevs].random
+ dictionaries[:province_abbrevs].random.unextend
end
# Gets one of the formats from 'zip_formats' and converts it to numbers.
#
# Forgery(:address).zip
@@ -130,11 +130,11 @@
# # => "Uruguay"
#
# Forgery(:address).country
# # => "Romania"
def self.country
- dictionaries[:countries].random
+ dictionaries[:countries].random.unextend
end
# Gets a random continent out of the 'continents' dictionary.
#
@@ -142,9 +142,9 @@
# # => "Africa"
#
# Forgery(:address).continent
# # => "Europe"
def self.continent
- dictionaries[:continents].random
+ dictionaries[:continents].random.unextend
end
end