Skip to content
Snippets Groups Projects
Commit a236e32b authored by dreamfall's avatar dreamfall
Browse files

do not redefine "type" method

parent 85a6287a
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,10 @@ module Geocoder::Result ...@@ -74,6 +74,10 @@ module Geocoder::Result
@data['class'] @data['class']
end end
def place_type
@data['type']
end
def self.response_attributes def self.response_attributes
%w[place_id osm_type osm_id boundingbox license %w[place_id osm_type osm_id boundingbox license
polygonpoints display_name class type stadium] polygonpoints display_name class type stadium]
...@@ -84,6 +88,11 @@ module Geocoder::Result ...@@ -84,6 +88,11 @@ module Geocoder::Result
@data['class'] @data['class']
end end
def type
warn "DEPRECATION WARNING: The 'type' method of Geocoder::Result::Nominatim objects is deprecated and will be removed in Geocoder version 1.2.0. Please use 'place_type' instead."
@data['type']
end
response_attributes.each do |a| response_attributes.each do |a|
unless method_defined?(a) unless method_defined?(a)
define_method a do define_method a do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment