Class: Retab::ExtractionWorkflowArtifact
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ExtractionWorkflowArtifact
- Defined in:
- lib/retab/workflow_artifacts/extraction_workflow_artifact.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, file: :file, model: :model, json_schema: :json_schema, n_consensus: :n_consensus, image_resolution_dpi: :image_resolution_dpi, instructions: :instructions, output: :output, consensus: :consensus, metadata: :metadata, usage: :usage, created_at: :created_at, operation: :operation }.freeze
Instance Attribute Summary collapse
-
#consensus ⇒ Object
Returns the value of attribute consensus.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#file ⇒ Object
Returns the value of attribute file.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_resolution_dpi ⇒ Object
Returns the value of attribute image_resolution_dpi.
-
#instructions ⇒ Object
Returns the value of attribute instructions.
-
#json_schema ⇒ Object
Returns the value of attribute json_schema.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#model ⇒ Object
Returns the value of attribute model.
-
#n_consensus ⇒ Object
Returns the value of attribute n_consensus.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#output ⇒ Object
Returns the value of attribute output.
-
#usage ⇒ Object
Returns the value of attribute usage.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ExtractionWorkflowArtifact
constructor
A new instance of ExtractionWorkflowArtifact.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ExtractionWorkflowArtifact
Returns a new instance of ExtractionWorkflowArtifact.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 39 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @file = hash[:file] ? Retab::FileRef.new(hash[:file]) : nil @model = hash[:model] @json_schema = hash[:json_schema] || {} @n_consensus = hash[:n_consensus] @image_resolution_dpi = hash[:image_resolution_dpi] @instructions = hash[:instructions] @output = hash[:output] || {} @consensus = hash[:consensus] ? Retab::ExtractionConsensus.new(hash[:consensus]) : nil @metadata = hash[:metadata] || {} @usage = hash[:usage] ? Retab::RetabUsage.new(hash[:usage]) : nil @created_at = hash[:created_at] @operation = hash[:operation] end |
Instance Attribute Details
#consensus ⇒ Object
Returns the value of attribute consensus.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def consensus @consensus end |
#created_at ⇒ Object
Returns the value of attribute created_at.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def created_at @created_at end |
#file ⇒ Object
Returns the value of attribute file.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def file @file end |
#id ⇒ Object
Returns the value of attribute id.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def id @id end |
#image_resolution_dpi ⇒ Object
Returns the value of attribute image_resolution_dpi.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def image_resolution_dpi @image_resolution_dpi end |
#instructions ⇒ Object
Returns the value of attribute instructions.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def instructions @instructions end |
#json_schema ⇒ Object
Returns the value of attribute json_schema.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def json_schema @json_schema end |
#metadata ⇒ Object
Returns the value of attribute metadata.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def @metadata end |
#model ⇒ Object
Returns the value of attribute model.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def model @model end |
#n_consensus ⇒ Object
Returns the value of attribute n_consensus.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def n_consensus @n_consensus end |
#operation ⇒ Object
Returns the value of attribute operation.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def operation @operation end |
#output ⇒ Object
Returns the value of attribute output.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def output @output end |
#usage ⇒ Object
Returns the value of attribute usage.
24 25 26 |
# File 'lib/retab/workflow_artifacts/extraction_workflow_artifact.rb', line 24 def usage @usage end |