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

do not redefine `class` method

parent 5d5b3e30
No related branches found
No related tags found
No related merge requests found
...@@ -70,14 +70,20 @@ module Geocoder::Result ...@@ -70,14 +70,20 @@ module Geocoder::Result
[@data['lat'].to_f, @data['lon'].to_f] [@data['lat'].to_f, @data['lon'].to_f]
end end
def place_class
@data['class']
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
response_attributes.each do |a| response_attributes.each do |a|
define_method a do unless method_defined?(a)
@data[a] define_method a do
@data[a]
end
end end
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