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

Merge branch 'master' into v1.2.0

Conflicts:
	lib/geocoder/results/nominatim.rb
parents 7286c4a4 6719d9d2
No related branches found
No related tags found
No related merge requests found
...@@ -384,6 +384,7 @@ This example uses Redis, but the cache store can be any object that supports the ...@@ -384,6 +384,7 @@ This example uses Redis, but the cache store can be any object that supports the
* <tt>store#[](key)</tt> - retrieves a value * <tt>store#[](key)</tt> - retrieves a value
* <tt>store#[]=(key, value)</tt> - stores a value * <tt>store#[]=(key, value)</tt> - stores a value
* <tt>store#keys</tt> - lists all keys * <tt>store#keys</tt> - lists all keys
* <tt>store#del(url)</tt> - deletes a value
Even a plain Ruby hash will work, though it's not a great choice (cleared out when app is restarted, not shared between app instances, etc). Even a plain Ruby hash will work, though it's not a great choice (cleared out when app is restarted, not shared between app instances, etc).
......
...@@ -74,11 +74,25 @@ module Geocoder::Result ...@@ -74,11 +74,25 @@ 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]
end end
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| 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