Skip to content
Permalink
Browse files
do not redefine class method
  • Loading branch information
dreamfall committed Sep 18, 2012
1 parent 5d5b3e3 commit c741d4a7654de053a87202d881bdaf0e9ce90e49
Showing 1 changed file with 8 additions and 2 deletions.
@@ -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
Copy link

@zenspider zenspider commented on c741d4a Sep 27, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do the same thing for #type

Please sign in to comment.