Class: Pikuri::Extractor::Page
- Inherits:
-
Data
- Object
- Data
- Pikuri::Extractor::Page
- Defined in:
- lib/pikuri/extractor.rb
Overview
One windowed slice of a document, returned by extract_paged, carrying everything a trailer needs without re-reading the document.
lines—Array<String>, the collected window; already per-line truncated (with PAGE_LINE_TRUNCATION_MARKER), not line-numbered (numbering is the caller's presentation). Includes any +"--- Page N ---"+ marker lines, which count toward +limit+/the byte cap.start_line— 1-indexed line number oflines.first(the requestedoffset).total_lines—Integerdocument line count when known, elsenil. Known at EOF, when extracted in full (HTML), or on a cheap-to-count stream (text);nilwhen a lazy stream stopped early (byte cap, or a PDF window filled before the last page — counting the rest would parse every page).more—trueif content remains past this window.byte_capped—trueif the byte cap (not the line limit) stopped it.kind— the matched extractor'skindtag.
Empty document → lines: [], total_lines: 0; offset past EOF →
lines: [] with total_lines at the real count — the caller
distinguishes the two.
Instance Attribute Summary collapse
-
#byte_capped ⇒ Object
readonly
Returns the value of attribute byte_capped.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#more ⇒ Object
readonly
Returns the value of attribute more.
-
#start_line ⇒ Object
readonly
Returns the value of attribute start_line.
-
#total_lines ⇒ Object
readonly
Returns the value of attribute total_lines.
Instance Attribute Details
#byte_capped ⇒ Object (readonly)
Returns the value of attribute byte_capped
104 105 106 |
# File 'lib/pikuri/extractor.rb', line 104 def byte_capped @byte_capped end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
104 105 106 |
# File 'lib/pikuri/extractor.rb', line 104 def kind @kind end |
#lines ⇒ Object (readonly)
Returns the value of attribute lines
104 105 106 |
# File 'lib/pikuri/extractor.rb', line 104 def lines @lines end |
#more ⇒ Object (readonly)
Returns the value of attribute more
104 105 106 |
# File 'lib/pikuri/extractor.rb', line 104 def more @more end |
#start_line ⇒ Object (readonly)
Returns the value of attribute start_line
104 105 106 |
# File 'lib/pikuri/extractor.rb', line 104 def start_line @start_line end |
#total_lines ⇒ Object (readonly)
Returns the value of attribute total_lines
104 105 106 |
# File 'lib/pikuri/extractor.rb', line 104 def total_lines @total_lines end |