From b7515a1ac4567328492bc81e7c6d8f65f67117ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C6=B0ng=20=C4=90=C3=A0o?= <zocoi@users.noreply.github.com>
Date: Wed, 11 Jan 2017 13:16:20 -0800
Subject: [PATCH] Place of interest can be referred from `place_type` for
 Nominatim result (#1141)

---
 lib/geocoder/results/nominatim.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/geocoder/results/nominatim.rb b/lib/geocoder/results/nominatim.rb
index 1cf92ec8..d60005bd 100644
--- a/lib/geocoder/results/nominatim.rb
+++ b/lib/geocoder/results/nominatim.rb
@@ -4,9 +4,7 @@ module Geocoder::Result
   class Nominatim < Base
 
     def poi
-      %w[building university school hospital mall hotel restaurant stadium bus_stop tram_stop].each do |key|
-        return @data['address'][key] if @data['address'].key?(key)
-      end
+      return @data['address'][place_type] if @data['address'].key?(place_type)
       return nil
     end
 
-- 
GitLab