Permalink
Browse files

do not redefine `class` method

  • Loading branch information...
dreamfall committed Sep 15, 2012
1 parent 5d5b3e3 commit c741d4a7654de053a87202d881bdaf0e9ce90e49
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/geocoder/results/nominatim.rb
@@ -70,14 +70,20 @@ def coordinates
[@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
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

1 comment on commit c741d4a

@zenspider

This comment has been minimized.

Show comment
Hide comment
@zenspider

zenspider Sep 27, 2012

Please do the same thing for #type

zenspider commented on c741d4a Sep 27, 2012

Please do the same thing for #type

Please sign in to comment.