From 30e28e9b8205db53b1bfe3613c451a02cd7ec177 Mon Sep 17 00:00:00 2001 From: Arsalan Ahmed Tahir <azlantaher@gmail.com> Date: Wed, 20 Mar 2013 20:54:43 +0500 Subject: [PATCH] Added neighborhood method to google result. --- lib/geocoder/results/google.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/geocoder/results/google.rb b/lib/geocoder/results/google.rb index d692b8e8..f9a708a1 100644 --- a/lib/geocoder/results/google.rb +++ b/lib/geocoder/results/google.rb @@ -11,6 +11,12 @@ module Geocoder::Result formatted_address end + def neighborhood + if neighborhood = address_components_of_type(:neighborhood).first + neighborhood['long_name'] + end + end + def city fields = [:locality, :sublocality, :administrative_area_level_3, -- GitLab