def parse(artifacts:, queries:)
      raise ArgumentError, 'Error: Must have artifacts' if artifacts.nil?
      raise ArgumentError, 'Error: Must have queries' unless queries.is_a?(Array)

      # Example
      # [
      #   {
      #     node_index: 0,
      #     path: "/tmp/circle-artifacts.NHQxLku/cherry-pie.png",
      #     pretty_path: "$CIRCLE_ARTIFACTS/cherry-pie.png",
      #     url: "https://circleci.com/gh/circleci/mongofinil/22/artifacts/0/tmp/circle-artifacts.NHQxLku/cherry-pie.png"
      #   },
      #   {
      #     node_index: 0,
      #     path: "/tmp/circle-artifacts.NHQxLku/rhubarb-pie.png",
      #     pretty_path: "$CIRCLE_ARTIFACTS/rhubarb-pie.png",
      #     url: "https://circleci.com/gh/circleci/mongofinil/22/artifacts/0/tmp/circle-artifacts.NHQxLku/rhubarb-pie.png"
      #   }
      # ]

      results = ResultSet.new

      artifacts.body.each do |artifact|
        url = artifact['url']
        if url.nil?
          STDERR.puts "Warning: No URL found on #{artifact}"
          next
        end

        query = queries.find { |q| url.include?(q.url_substring) }
        next if query.nil?
        result = Result.new(query: query, url: url)
        results.add_result(result)
      end

      results
    end
def parse(artifacts:, queries:)
      raise ArgumentError, 'Error: Must have artifacts' if artifacts.nil?
      raise ArgumentError, 'Error: Must have queries' unless queries.is_a?(Array)

      # Example
      # [
      #   {
      #     node_index: 0,
      #     path: "/tmp/circle-artifacts.NHQxLku/cherry-pie.png",
      #     pretty_path: "$CIRCLE_ARTIFACTS/cherry-pie.png",
      #     url: "https://circleci.com/gh/circleci/mongofinil/22/artifacts/0/tmp/circle-artifacts.NHQxLku/cherry-pie.png"
      #   },
      #   {
      #     node_index: 0,
      #     path: "/tmp/circle-artifacts.NHQxLku/rhubarb-pie.png",
      #     pretty_path: "$CIRCLE_ARTIFACTS/rhubarb-pie.png",
      #     url: "https://circleci.com/gh/circleci/mongofinil/22/artifacts/0/tmp/circle-artifacts.NHQxLku/rhubarb-pie.png"
      #   }
      # ]

      results = ResultSet.new

      artifacts.body.each do |artifact|
        url = artifact['url']
        if url.nil?
          STDERR.puts "Warning: No URL found on #{artifact}"
          next
        end

        query = queries.find { |q| url.include?(q.url_substring) }
        next if query.nil?
        result = Result.new(query: query, url: url)
        results.add_result(result)
      end

      results
    end
Internal method for extracting results
 @param artifacts [CircleCi::Artifacts]
 @param queries [Array<Query>]
 @return  [ResultSet]