Class: Mindee::Parsing::V2::RawTextPage

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/parsing/v2/raw_text_page.rb

Overview

Raw text extracted from a single page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server_response) ⇒ RawTextPage

Returns a new instance of RawTextPage.

Parameters:

  • server_response (Hash)

    Raw JSON parsed into a Hash.



12
13
14
# File 'lib/mindee/parsing/v2/raw_text_page.rb', line 12

def initialize(server_response)
  @content = server_response['content']
end

Instance Attribute Details

#contentString (readonly)

Returns Text content of the page as a single string. '\n' is used to separate lines.

Returns:

  • (String)

    Text content of the page as a single string. '\n' is used to separate lines.



9
10
11
# File 'lib/mindee/parsing/v2/raw_text_page.rb', line 9

def content
  @content
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/mindee/parsing/v2/raw_text_page.rb', line 16

def to_s
  @content
end