Class: Mindee::V2::Product::Extraction::ExtractionResponse
- Inherits:
-
Mindee::V2::Parsing::BaseResponse
- Object
- Mindee::V2::Parsing::CommonResponse
- Mindee::V2::Parsing::BaseResponse
- Mindee::V2::Product::Extraction::ExtractionResponse
- Defined in:
- lib/mindee/v2/product/extraction/extraction_response.rb,
sig/mindee/v2/product/extraction/extraction_response.rbs
Overview
HTTP response wrapper that embeds a V2 Inference.
Instance Attribute Summary collapse
-
#inference ⇒ ExtractionInference
readonly
Parsed inference payload.
Attributes inherited from Mindee::V2::Parsing::CommonResponse
Class Method Summary collapse
Instance Method Summary collapse
- #_params_type ⇒ singleton(Params::ExtractionParameters)
-
#initialize(server_response) ⇒ ExtractionResponse
constructor
A new instance of ExtractionResponse.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize(server_response) ⇒ ExtractionResponse
Returns a new instance of ExtractionResponse.
17 18 19 20 21 |
# File 'lib/mindee/v2/product/extraction/extraction_response.rb', line 17 def initialize(server_response) super @inference = Mindee::V2::Product::Extraction::ExtractionInference.new(server_response['inference']) end |
Instance Attribute Details
#inference ⇒ ExtractionInference (readonly)
Returns Parsed inference payload.
12 13 14 |
# File 'lib/mindee/v2/product/extraction/extraction_response.rb', line 12 def inference @inference end |
Class Method Details
._params_type ⇒ singleton(Params::ExtractionParameters)
17 |
# File 'sig/mindee/v2/product/extraction/extraction_response.rbs', line 17 def self._params_type: () -> singleton(Params::ExtractionParameters) |
Instance Method Details
#_params_type ⇒ singleton(Params::ExtractionParameters)
15 |
# File 'sig/mindee/v2/product/extraction/extraction_response.rbs', line 15 def _params_type: -> singleton(Params::ExtractionParameters) |
#to_s ⇒ String
String representation.
25 26 27 |
# File 'lib/mindee/v2/product/extraction/extraction_response.rb', line 25 def to_s @inference.to_s end |