Class: Mindee::V2::Product::Classification::ClassificationResponse
- Inherits:
-
Mindee::V2::Parsing::BaseResponse
- Object
- Parsing::V2::CommonResponse
- Mindee::V2::Parsing::BaseResponse
- Mindee::V2::Product::Classification::ClassificationResponse
- Defined in:
- lib/mindee/v2/product/classification/classification_response.rb
Overview
HTTP response wrapper that embeds a V2 Inference.
Instance Attribute Summary collapse
-
#inference ⇒ ClassificationInference
readonly
Parsed inference payload.
Attributes inherited from Parsing::V2::CommonResponse
Instance Method Summary collapse
-
#initialize(server_response) ⇒ ClassificationResponse
constructor
A new instance of ClassificationResponse.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize(server_response) ⇒ ClassificationResponse
Returns a new instance of ClassificationResponse.
17 18 19 20 21 |
# File 'lib/mindee/v2/product/classification/classification_response.rb', line 17 def initialize(server_response) super @inference = ClassificationInference.new(server_response['inference']) end |
Instance Attribute Details
#inference ⇒ ClassificationInference (readonly)
Returns Parsed inference payload.
14 15 16 |
# File 'lib/mindee/v2/product/classification/classification_response.rb', line 14 def inference @inference end |
Instance Method Details
#to_s ⇒ String
String representation.
25 26 27 |
# File 'lib/mindee/v2/product/classification/classification_response.rb', line 25 def to_s @inference.to_s end |