def each_redirect(&block)
      return enum_for(__method__) unless block

      if (locations = @response.get_fields('Location'))
        # Location headers override any meta-refresh redirects in the HTML
        locations.each(&block)
      else
        # check page-level meta redirects if there isn't a location header
        each_meta_redirect(&block)
      end
    end
def each_redirect(&block)
      return enum_for(__method__) unless block

      if (locations = @response.get_fields('Location'))
        # Location headers override any meta-refresh redirects in the HTML
        locations.each(&block)
      else
        # check page-level meta redirects if there isn't a location header
        each_meta_redirect(&block)
      end
    end
Enumerates over every HTTP or meta-redirect link in the page.

 @yield [link]
   The given block will be passed every redirection link from the page.

 @yieldparam [String] link
   A HTTP or meta-redirect link from the page.

 @return [Enumerator]
   If no block is given, an enumerator object will be returned.

 @since 0.3.0