def links
      @_links ||= {}.tap do |links|
        Array(headers["Link"] || headers["link"]).map do |link|
          link.match %r{\A<([^>]+)>;\s*rel="([^"]+)"\z}
        end.compact.each do |match|
          links[match[2].downcase.to_sym] = match[1]
        end
      end
    end
def links
      @_links ||= {}.tap do |links|
        Array(headers["Link"] || headers["link"]).map do |link|
          link.match %r{\A<([^>]+)>;\s*rel="([^"]+)"\z}
        end.compact.each do |match|
          links[match[2].downcase.to_sym] = match[1]
        end
      end
    end
See: http://tools.ietf.org/html/rfc5988