Skip to content

Commit

Permalink
Add more examples for clarifying full_address_as_hash usages
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrAdelKhalil committed May 19, 2020
1 parent c8b1602 commit 24c8797
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/faker/default/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,15 @@ def full_address
# country_name_to_code: {name: 'united_states'})
# #=> {:longitude=>-101.74428917174603, :latitude=>-37.40056749089944, :country_name_to_code=>"US"}
#
# Faker::Address.full_address_as_hash(:full_address)
# #=> {:full_address=>"87635 Rice Street, Lake Brentonton, OR 61896-5968"}
#
# Faker::Address.full_address_as_hash(:city, :time_zone)
# #=> {:city=>"East Faustina", :time_zone=>"America/Mexico_City"}
#
# Faker::Address.full_address_as_hash(:street_address, street_address: {include_secondary: true})
# #=> {:street_address=>"29423 Kenneth Causeway Suite 563"}
#
# @faker.version next
def full_address_as_hash(*attrs, **attrs_params)
attrs.map!(&:to_sym)
Expand Down

0 comments on commit 24c8797

Please sign in to comment.