class Nokogiri::HTML5::DocumentFragment
def initialize(doc, tags = nil, ctx = nil, options = {}) # rubocop:disable Lint/MissingSuper
Create a document fragment.
def initialize(doc, tags = nil, ctx = nil, options = {}) # rubocop:disable Lint/MissingSuper self.document = doc self.errors = [] return self unless tags max_attributes = options[:max_attributes] || Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES max_errors = options[:max_errors] || Nokogiri::Gumbo::DEFAULT_MAX_ERRORS max_depth = options[:max_tree_depth] || Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH tags = Nokogiri::HTML5.read_and_encode(tags, nil) Nokogiri::Gumbo.fragment(self, tags, ctx, max_attributes, max_errors, max_depth) end