class ProxyFetcher::Document::OgaAdapter

HTML parser adapter that uses Oga as a backend.

Public Class Methods

install_requirements!() click to toggle source

Requires Oga gem to the application.

# File lib/proxy_fetcher/document/adapters/oga_adapter.rb, line 8
def self.install_requirements!
  require "oga"
end
parse(data) click to toggle source

Parses raw HTML content with specific gem.

@param data [String]

HTML content

@return [ProxyFetcher::Document::OgaAdapter]

Object with parsed document
# File lib/proxy_fetcher/document/adapters/oga_adapter.rb, line 20
def self.parse(data)
  new(::Oga.parse_html(data))
end