Class: Kreuzberg::DocumentStructure

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/kreuzberg/types.rb

Overview

Structured document representation.

Provides a hierarchical, tree-based representation of document content using a flat array of nodes with index-based parent/child references.

Examples:

structure = Kreuzberg::DocumentStructure.new(
  nodes: [node1, node2, node3]
)
structure.nodes.each do |node|
  puts "#{node.id}: #{node.content}"
end