Class: DynamicPDFApi::PdfTextResponse

Inherits:
JsonResponse show all
Defined in:
lib/ruby_client/PdfTextResponse.rb

Overview

Represents the pdf text response.

Instance Attribute Summary collapse

Attributes inherited from JsonResponse

#json_content

Attributes inherited from Response

#error_id, #error_json, #error_message, #is_successful, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(json_content) ⇒ PdfTextResponse

Initializes a new instance of the PdfResponse class.

Parameters:

  • json_content (String)

    The json content



13
14
15
16
17
18
19
20
# File 'lib/ruby_client/PdfTextResponse.rb', line 13

def initialize(json_content)
  @content = JSON.pretty_generate(json_content).gsub('\\\\', '\\').gsub('\"', '"').gsub('\\\r', '\r').gsub('\\\n', '\n').gsub(
    '\\\t', '\t'
  )
  @content = @content[1..@content.length - 2]

  super(json_content)
end

Instance Attribute Details

#contentObject

Gets the collection of PdfContent.



25
26
27
# File 'lib/ruby_client/PdfTextResponse.rb', line 25

def content
  @content
end