Class: Mindee::Parsing::V2::InferenceResponse

Inherits:
CommonResponse show all
Defined in:
lib/mindee/parsing/v2/inference_response.rb

Overview

HTTP response wrapper that embeds a V2 Inference.

Instance Attribute Summary collapse

Attributes inherited from CommonResponse

#raw_http

Instance Method Summary collapse

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

#inferenceInference (readonly)



12
13
14
# File 'lib/mindee/parsing/v2/inference_response.rb', line 12

def inference
  @inference
end

Instance Method Details

#to_sString

String representation.



24
25
26
# File 'lib/mindee/parsing/v2/inference_response.rb', line 24

def to_s
  @inference.to_s
end