Class: Mindee::Product::InvoiceSplitter::InvoiceSplitterV1PageGroup
- Inherits:
-
Object
- Object
- Mindee::Product::InvoiceSplitter::InvoiceSplitterV1PageGroup
- Defined in:
- lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb
Overview
Page Group for Invoice Splitter class
Instance Attribute Summary collapse
-
#confidence ⇒ Object
readonly
@return[Float, nil].
-
#page_indexes ⇒ Object
readonly
-
#initialize(prediction) ⇒ InvoiceSplitterV1PageGroup
constructor
A new instance of InvoiceSplitterV1PageGroup.
- #to_s ⇒ String
Constructor Details
#initialize(prediction) ⇒ InvoiceSplitterV1PageGroup
Returns a new instance of InvoiceSplitterV1PageGroup.
17 18 19 20
# File 'lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb', line 17 def initialize(prediction) @page_indexes = prediction['page_indexes'] @confidence = prediction['confidence'].nil? ? 0.0 : Float(prediction['confidence']) end
Instance Attribute Details
#confidence ⇒ Object (readonly)
@return[Float, nil]
14 15 16
# File 'lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb', line 14 def confidence @confidence end
#page_indexes ⇒ Object (readonly)
Instance Method Details
#to_s ⇒ String
23 24 25 26 27
# File 'lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb', line 23 def to_s out_str = String.new out_str << ":Page indexes: #{@page_indexes.join(', ')}" out_str end
-
#initialize(prediction) ⇒ InvoiceSplitterV1PageGroup
constructor