Class: Mindee::Product::Generated::GeneratedV1
- Inherits:
-
Mindee::Parsing::Common::Inference
- Object
- Mindee::Parsing::Common::Inference
- Mindee::Product::Generated::GeneratedV1
- Defined in:
- lib/mindee/product/generated/generated_v1.rb
Overview
Generated Document V1 prediction inference.
Class Attribute Summary collapse
-
.endpoint_name ⇒ String
readonly
Name of the endpoint for this product.
-
.endpoint_version ⇒ String
readonly
Version for this product.
Attributes inherited from Mindee::Parsing::Common::Inference
#is_rotation_applied, #pages, #prediction, #product
Instance Method Summary collapse
-
#initialize(prediction) ⇒ GeneratedV1
constructor
A new instance of GeneratedV1.
Methods inherited from Mindee::Parsing::Common::Inference
Constructor Details
#initialize(prediction) ⇒ GeneratedV1
Returns a new instance of GeneratedV1.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mindee/product/generated/generated_v1.rb', line 16 def initialize(prediction) super @prediction = GeneratedV1Document.new(prediction['prediction']) @pages = [] prediction['pages'].each do |page| if page.key?('prediction') && !page['prediction'].nil? && !page['prediction'].empty? @pages.push(GeneratedV1Page.new(page)) end end end |
Class Attribute Details
.endpoint_name ⇒ String (readonly)
Name of the endpoint for this product.
30 31 32 |
# File 'lib/mindee/product/generated/generated_v1.rb', line 30 def endpoint_name @endpoint_name end |
.endpoint_version ⇒ String (readonly)
Version for this product.
33 34 35 |
# File 'lib/mindee/product/generated/generated_v1.rb', line 33 def endpoint_version @endpoint_version end |