Class: Mindee::V2::Product::OCR::OCRInference
- Inherits:
-
Mindee::V2::Parsing::BaseInference
- Object
- BaseProduct
- Mindee::V2::Parsing::BaseInference
- Mindee::V2::Product::OCR::OCRInference
- Defined in:
- lib/mindee/v2/product/ocr/ocr_inference.rb
Overview
The inference result for an OCR utility request.
Instance Attribute Summary collapse
-
#result ⇒ OCRResult
readonly
Parsed inference payload.
Attributes inherited from Mindee::V2::Parsing::BaseInference
Instance Method Summary collapse
-
#initialize(server_response) ⇒ OCRInference
constructor
A new instance of OCRInference.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize(server_response) ⇒ OCRInference
Returns a new instance of OCRInference.
15 16 17 18 19 |
# File 'lib/mindee/v2/product/ocr/ocr_inference.rb', line 15 def initialize(server_response) super @result = OCRResult.new(server_response['result']) end |
Instance Attribute Details
#result ⇒ OCRResult (readonly)
Returns Parsed inference payload.
12 13 14 |
# File 'lib/mindee/v2/product/ocr/ocr_inference.rb', line 12 def result @result end |
Instance Method Details
#to_s ⇒ String
String representation.
23 24 25 26 27 28 29 |
# File 'lib/mindee/v2/product/ocr/ocr_inference.rb', line 23 def to_s [ super, @result.to_s, '', ].join("\n") end |