Class: Kreuzberg::Result::Table

Inherits:
Struct
  • Object
show all
Defined in:
lib/kreuzberg/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cellsArray<Array<String>> (readonly)

Returns Table cells (2D array).

Returns:

  • (Array<Array<String>>)

    Table cells (2D array)



25
26
27
28
29
# File 'lib/kreuzberg/result.rb', line 25

Table = Struct.new(:cells, :markdown, :page_number, keyword_init: true) do
  def to_h
    { cells: cells, markdown: markdown, page_number: page_number }
  end
end

#markdownString (readonly)

Returns Markdown representation.

Returns:

  • (String)

    Markdown representation



25
26
27
28
29
# File 'lib/kreuzberg/result.rb', line 25

Table = Struct.new(:cells, :markdown, :page_number, keyword_init: true) do
  def to_h
    { cells: cells, markdown: markdown, page_number: page_number }
  end
end

#page_numberInteger (readonly)

Returns Page number where table was found.

Returns:

  • (Integer)

    Page number where table was found



25
26
27
28
29
# File 'lib/kreuzberg/result.rb', line 25

Table = Struct.new(:cells, :markdown, :page_number, keyword_init: true) do
  def to_h
    { cells: cells, markdown: markdown, page_number: page_number }
  end
end

Instance Method Details

#to_hObject



26
27
28
# File 'lib/kreuzberg/result.rb', line 26

def to_h
  { cells: cells, markdown: markdown, page_number: page_number }
end