Skip to content
Snippets Groups Projects
Commit 6719d9d2 authored by Alex Reisner's avatar Alex Reisner
Browse files

Merge pull request #302 from dreamfall/patch-3

do not redefine "type" method
parents 1bcf4077 a236e32b
No related branches found
No related tags found
No related merge requests found
......@@ -74,16 +74,25 @@ module Geocoder::Result
@data['class']
end
def place_type
@data['type']
end
def self.response_attributes
%w[place_id osm_type osm_id boundingbox license
polygonpoints display_name class type stadium]
end
define_method 'class' do
def class
warn "DEPRECATION WARNING: The 'class' method of Geocoder::Result::Nominatim objects is deprecated and will be removed in Geocoder version 1.2.0. Please use 'place_class' instead."
@data['class']
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|
unless method_defined?(a)
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