Class: Mindee::V2::Product::Extraction::ExtractionInference

Inherits:
Parsing::V2::Inference show all
Defined in:
lib/mindee/v2/product/extraction/extraction_inference.rb

Overview

Extraction inference.

Instance Attribute Summary collapse

Attributes inherited from Parsing::V2::Inference

#active_options

Attributes inherited from Mindee::V2::Parsing::BaseInference

#file, #id, #job, #model

Instance Method Summary collapse

Methods inherited from Parsing::V2::Inference

#to_s

Methods inherited from Mindee::V2::Parsing::BaseInference

#to_s

Constructor Details

#initialize(server_response) ⇒ ExtractionInference

Returns a new instance of ExtractionInference.

Parameters:

  • server_response (Hash)

    Hash representation of the JSON returned by the service.



16
17
18
19
20
# File 'lib/mindee/v2/product/extraction/extraction_inference.rb', line 16

def initialize(server_response)
  super

  @result = Mindee::V2::Product::Extraction::ExtractionResult.new(server_response['result'])
end

Instance Attribute Details

#resultExtractionResult (readonly)

Returns Parsed inference payload.

Returns:



13
14
15
# File 'lib/mindee/v2/product/extraction/extraction_inference.rb', line 13

def result
  @result
end