diff --git a/lib/geocoder/results/yahoo.rb b/lib/geocoder/results/yahoo.rb index d82a08023742e1c1ca1b79fe2ec52780c27f8229..3f964fa250d84caf9bc8bf33dc6e1b6f6681c897 100644 --- a/lib/geocoder/results/yahoo.rb +++ b/lib/geocoder/results/yahoo.rb @@ -11,7 +11,7 @@ module Geocoder::Result (1..3).to_a.map{ |i| @data["line#{i}"] }.reject{ |i| i.nil? or i == "" }.join(", ") end - def self.yahoo_attributes + def self.response_attributes %w[quality latitude longitude offsetlat offsetlon radius boundingbox name line1 line2 line3 line4 cross house street xstreet unittype unit postal neighborhood city county state country countrycode statecode countycode @@ -19,7 +19,7 @@ module Geocoder::Result timezone areacode uzip hash woeid woetype] end - yahoo_attributes.each do |a| + response_attributes.each do |a| define_method a do @data[a] end