def detect_and_parse(phone, country)
      result = {}
      Phonelib.phone_data.each do |key, data|
        parsed = parse_single_country(phone, data)
        if (!Phonelib.strict_double_prefix_check || key == country) && double_prefix_allowed?(data, phone, parsed && parsed[key])
          parsed = parse_single_country(changed_dp_phone(key, phone), data)
        end
        result.merge!(parsed) unless parsed.nil?
      end
      result
    end
def detect_and_parse(phone, country)
      result = {}
      Phonelib.phone_data.each do |key, data|
        parsed = parse_single_country(phone, data)
        if (!Phonelib.strict_double_prefix_check || key == country) && double_prefix_allowed?(data, phone, parsed && parsed[key])
          parsed = parse_single_country(changed_dp_phone(key, phone), data)
        end
        result.merge!(parsed) unless parsed.nil?
      end
      result
    end
method tries to detect what is the country for provided phone

 ==== Attributes

 * +phone+ - phone number for parsing