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

Merge branch 'master' of github.com:alexreisner/geocoder

parents 9b972354 7fe02857
No related branches found
No related tags found
No related merge requests found
......@@ -70,14 +70,25 @@ module Geocoder::Result
[@data['lat'].to_f, @data['lon'].to_f]
end
def place_class
@data['class']
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
warn "Method 'class' is deprecated. Use 'place_class' instead"
@data['class']
end
response_attributes.each do |a|
define_method a do
@data[a]
unless method_defined?(a)
define_method a do
@data[a]
end
end
end
end
......
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