Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #420 from azlantaher88/master

Added neighborhood method to Geocoder::Result::Google class
  • Loading branch information...
commit fad6274103c3cc8efcc9ee84c282fa863f2040e9 2 parents ea6ec79 + 30e28e9
@alexreisner authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/geocoder/results/google.rb
View
6 lib/geocoder/results/google.rb
@@ -11,6 +11,12 @@ def address(format = :full)
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,
Please sign in to comment.
Something went wrong with that request. Please try again.