lib/wp_api_client/collection.rb
def parse_link_header(header, params={})
      links = Hash.new
      return links unless header
      parts = header.split(',')
      parts.each do |part, index|
        section = part.split(';')
        url = section[0][/<(.*)>/,1]
        name = section[1][/rel="(.*)"/,1].to_sym
        links[name] = url
      end
      return links
    end
def parse_link_header(header, params={})
      links = Hash.new
      return links unless header
      parts = header.split(',')
      parts.each do |part, index|
        section = part.split(';')
        url = section[0][/<(.*)>/,1]
        name = section[1][/rel="(.*)"/,1].to_sym
        links[name] = url
      end
      return links
    end
https://www.snip2code.com/Snippet/71914/Parse-link-headers-from-Github-API-in-Ru