Class: Mindee::Parsing::V2::InferenceResponse
- Inherits:
-
CommonResponse
- Object
- CommonResponse
- Mindee::Parsing::V2::InferenceResponse
- Defined in:
- lib/mindee/parsing/v2/inference_response.rb
Overview
HTTP response wrapper that embeds a V2 Inference.
Instance Attribute Summary collapse
-
#inference ⇒ Inference
readonly
Parsed inference payload.
Attributes inherited from CommonResponse
Instance Method Summary collapse
-
#initialize(server_response) ⇒ InferenceResponse
constructor
A new instance of InferenceResponse.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize(server_response) ⇒ InferenceResponse
15 16 17 18 19 20 |
# File 'lib/mindee/parsing/v2/inference_response.rb', line 15 def initialize(server_response) # CommonResponse takes care of the generic metadata (status, etc.) super @inference = Inference.new(server_response['inference']) end |
Instance Attribute Details
#inference ⇒ Inference (readonly)
12 13 14 |
# File 'lib/mindee/parsing/v2/inference_response.rb', line 12 def inference @inference end |
Instance Method Details
#to_s ⇒ String
String representation.
24 25 26 |
# File 'lib/mindee/parsing/v2/inference_response.rb', line 24 def to_s @inference.to_s end |