lib/link-header-parser.rb in link-header-parser-1.0.0 vs lib/link-header-parser.rb in link-header-parser-2.0.0

- old
+ new

@@ -1,17 +1,21 @@ -require 'ostruct' +require 'forwardable' require 'absolutely' require 'link_header_parser/version' require 'link_header_parser/exceptions' -require 'link_header_parser/parsed_header' -require 'link_header_parser/parsed_header_collection' +require 'link_header_parser/link_header' +require 'link_header_parser/link_header_parameter' +require 'link_header_parser/link_headers_collection' module LinkHeaderParser - class << self - def parse(*headers, base:) - ParsedHeaderCollection.new(headers, base: base) - end + # Parse an array of HTTP Link headers + # + # @param headers [Array<String>] + # @param base [String] + # @return [LinkHeaderParser::LinkHeadersCollection] + def self.parse(*headers, base:) + LinkHeadersCollection.new(*headers, base: base) end end