# frozen_string_literal: true
module ProxyFetcher
# HTML document abstraction class. Used to work with different HTML parser adapters
# such as Nokogiri, Oga or a custom one. Stores backend]
# collection of nodes
#
def xpath(*args)
backend.xpath(*args).map { |node| backend.proxy_node.new(node) }
end
# Searches elements by CSS selector.
#
# @return [Array]
# collection of nodes
#
def css(*args)
backend.css(*args).map { |node| backend.proxy_node.new(node) }
end
end
end