class Geocoder::Lookup::Yahoo

def parse_raw_data(raw_data)


(which would add unnecessary complexity).
Handle that here, without parsing the XML
Yahoo returns errors as XML even when JSON format is specified.
#
def parse_raw_data(raw_data)
  if raw_data.match /^<\?xml/
    if raw_data.include?("Rate Limit Exceeded")
      raise_error(Geocoder::OverQueryLimitError) || warn("Over API query limit.")
    elsif raw_data.include?("Please provide valid credentials")
      raise_error(Geocoder::InvalidApiKey) || warn("Invalid API key.")
    end
  else
    super(raw_data)
  end
end