Class: Mindee::Parsing::V2::InferenceJob

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/parsing/v2/inference_job.rb

Overview

HTTP response wrapper that embeds a V2 job.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server_response) ⇒ InferenceJob

Returns a new instance of InferenceJob.



14
15
16
# File 'lib/mindee/parsing/v2/inference_job.rb', line 14

def initialize(server_response)
  @id = server_response['id']
end

Instance Attribute Details

#idString (readonly)

Returns UUID of the Job.

Returns:

  • (String)

    UUID of the Job.



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

def id
  @id
end

Instance Method Details

#to_sString

Returns String representation of the job.

Returns:

  • (String)

    String representation of the job.



19
20
21
# File 'lib/mindee/parsing/v2/inference_job.rb', line 19

def to_s
  "Job\n===\n:ID: #{@id}\n"
end