From 24c8797656e63057f0e52c6c44f2712f859f404b Mon Sep 17 00:00:00 2001 From: Amr Adel Date: Wed, 20 May 2020 01:56:23 +0200 Subject: [PATCH] Add more examples for clarifying full_address_as_hash usages --- lib/faker/default/address.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/faker/default/address.rb b/lib/faker/default/address.rb index 54dc96f693..d7d108948e 100644 --- a/lib/faker/default/address.rb +++ b/lib/faker/default/address.rb @@ -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)