Class: Retab::ParseWorkflowArtifact
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ParseWorkflowArtifact
- Defined in:
- lib/retab/workflow_artifacts/parse_workflow_artifact.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, file: :file, model: :model, table_parsing_format: :table_parsing_format, image_resolution_dpi: :image_resolution_dpi, instructions: :instructions, output: :output, usage: :usage, created_at: :created_at, operation: :operation }.freeze
Instance Attribute Summary collapse
-
#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.
-
#model ⇒ Object
Returns the value of attribute model.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#output ⇒ Object
Returns the value of attribute output.
-
#table_parsing_format ⇒ Object
Returns the value of attribute table_parsing_format.
-
#usage ⇒ Object
Returns the value of attribute usage.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ParseWorkflowArtifact
constructor
A new instance of ParseWorkflowArtifact.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ParseWorkflowArtifact
Returns a new instance of ParseWorkflowArtifact.
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 33 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @file = hash[:file] ? Retab::FileRef.new(hash[:file]) : nil @model = hash[:model] @table_parsing_format = hash[:table_parsing_format] @image_resolution_dpi = hash[:image_resolution_dpi] @instructions = hash[:instructions] @output = hash[:output] ? Retab::ParseOutput.new(hash[:output]) : nil @usage = hash[:usage] ? Retab::RetabUsage.new(hash[:usage]) : nil @created_at = hash[:created_at] @operation = hash[:operation] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def created_at @created_at end |
#file ⇒ Object
Returns the value of attribute file.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def file @file end |
#id ⇒ Object
Returns the value of attribute id.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def id @id end |
#image_resolution_dpi ⇒ Object
Returns the value of attribute image_resolution_dpi.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def image_resolution_dpi @image_resolution_dpi end |
#instructions ⇒ Object
Returns the value of attribute instructions.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def instructions @instructions end |
#model ⇒ Object
Returns the value of attribute model.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def model @model end |
#operation ⇒ Object
Returns the value of attribute operation.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def operation @operation end |
#output ⇒ Object
Returns the value of attribute output.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def output @output end |
#table_parsing_format ⇒ Object
Returns the value of attribute table_parsing_format.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def table_parsing_format @table_parsing_format end |
#usage ⇒ Object
Returns the value of attribute usage.
21 22 23 |
# File 'lib/retab/workflow_artifacts/parse_workflow_artifact.rb', line 21 def usage @usage end |