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