Class: Kreuzberg::Result::Table
- Inherits:
-
Struct
- Object
- Struct
- Kreuzberg::Result::Table
- Defined in:
- lib/kreuzberg/result.rb
Instance Attribute Summary collapse
-
#bounding_box ⇒ BoundingBox?
readonly
Bounding box of the table on the page.
-
#cells ⇒ Array<Array<String>>
readonly
Table cells (2D array).
-
#markdown ⇒ String
readonly
Markdown representation.
-
#page_number ⇒ Integer
readonly
Page number where table was found.
Instance Method Summary collapse
Instance Attribute Details
#bounding_box ⇒ BoundingBox? (readonly)
Returns Bounding box of the table on the page.
28 29 30 31 32 |
# File 'lib/kreuzberg/result.rb', line 28 Table = Struct.new(:cells, :markdown, :page_number, :bounding_box) do def to_h { cells: cells, markdown: markdown, page_number: page_number, bounding_box: bounding_box&.to_h } end end |
#cells ⇒ Array<Array<String>> (readonly)
Returns Table cells (2D array).
28 29 30 31 32 |
# File 'lib/kreuzberg/result.rb', line 28 Table = Struct.new(:cells, :markdown, :page_number, :bounding_box) do def to_h { cells: cells, markdown: markdown, page_number: page_number, bounding_box: bounding_box&.to_h } end end |
#markdown ⇒ String (readonly)
Returns Markdown representation.
28 29 30 31 32 |
# File 'lib/kreuzberg/result.rb', line 28 Table = Struct.new(:cells, :markdown, :page_number, :bounding_box) do def to_h { cells: cells, markdown: markdown, page_number: page_number, bounding_box: bounding_box&.to_h } end end |
#page_number ⇒ Integer (readonly)
Returns Page number where table was found.
28 29 30 31 32 |
# File 'lib/kreuzberg/result.rb', line 28 Table = Struct.new(:cells, :markdown, :page_number, :bounding_box) do def to_h { cells: cells, markdown: markdown, page_number: page_number, bounding_box: bounding_box&.to_h } end end |
Instance Method Details
#to_h ⇒ Object
29 30 31 |
# File 'lib/kreuzberg/result.rb', line 29 def to_h { cells: cells, markdown: markdown, page_number: page_number, bounding_box: bounding_box&.to_h } end |