Class: Mindee::V2::Product::Split::SplitInference

Inherits:
Mindee::V2::Parsing::BaseInference show all
Defined in:
lib/mindee/v2/product/split/split_inference.rb

Overview

Split inference result.

Instance Attribute Summary collapse

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

#file, #id, #job, #model

Instance Method Summary collapse

Constructor Details

#initialize(server_response) ⇒ SplitInference

Returns a new instance of SplitInference.

Parameters:

  • server_response (Hash)

    Hash representation of the JSON returned by the service.



15
16
17
18
19
# File 'lib/mindee/v2/product/split/split_inference.rb', line 15

def initialize(server_response)
  super

  @result = SplitResult.new(server_response['result'])
end

Instance Attribute Details

#resultSplitResult (readonly)

Returns Result of a split inference.

Returns:



12
13
14
# File 'lib/mindee/v2/product/split/split_inference.rb', line 12

def result
  @result
end

Instance Method Details

#to_sString

String representation.

Returns:

  • (String)


23
24
25
26
27
28
29
# File 'lib/mindee/v2/product/split/split_inference.rb', line 23

def to_s
  [
    super,
    @result.to_s,
    '',
  ].join("\n")
end