From d362268ade35549fc670dbed26cea9895fe29391 Mon Sep 17 00:00:00 2001 From: Josh Sharpe Date: Wed, 19 Jun 2019 09:22:02 +0800 Subject: [PATCH] expose json_result_object --- lib/google_places/spot.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/google_places/spot.rb b/lib/google_places/spot.rb index 232449d..e446e09 100644 --- a/lib/google_places/spot.rb +++ b/lib/google_places/spot.rb @@ -4,7 +4,8 @@ class Spot attr_accessor :lat, :lng, :viewport, :name, :icon, :reference, :vicinity, :types, :id, :formatted_phone_number, :international_phone_number, :formatted_address, :address_components, :street_number, :street, :city, :region, :postal_code, :country, :rating, :url, :cid, :website, :reviews, :aspects, :zagat_selected, :zagat_reviewed, - :photos, :review_summary, :nextpagetoken, :price_level, :opening_hours, :events, :utc_offset, :place_id, :permanently_closed + :photos, :review_summary, :nextpagetoken, :price_level, :opening_hours, :events, :utc_offset, :place_id, :permanently_closed, + :json_result_object # Search for Spots at the provided location # @@ -428,6 +429,7 @@ def self.multi_pages_request(method, multipage_request, options) # @param [JSON] json_result_object a JSON object to create a Spot from # @return [Spot] a newly created spot def initialize(json_result_object, api_key) + @json_result_object = json_result_object @reference = json_result_object['reference'] @place_id = json_result_object['place_id'] @vicinity = json_result_object['vicinity']