Class: Mindee::Product::US::BankCheck::BankCheckV1PagePrediction
- Inherits:
-
BankCheckV1Document
- Object
- Mindee::Parsing::Common::Prediction
- BankCheckV1Document
- Mindee::Product::US::BankCheck::BankCheckV1PagePrediction
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/us/bank_check/bank_check_v1_page.rb
Overview
Bank Check V1 page prediction.
Instance Attribute Summary collapse
-
#check_position ⇒ Mindee::Parsing::Standard::PositionField
readonly
The position of the check on the document.
-
#signatures_positions ⇒ Array<Mindee::Parsing::Standard::PositionField>
readonly
List of signature positions.
Attributes inherited from BankCheckV1Document
#account_number, #amount, #check_number, #date, #payees, #routing_number
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ BankCheckV1PagePrediction
constructor
A new instance of BankCheckV1PagePrediction.
- #to_s ⇒ String
Constructor Details
#initialize(prediction, page_id) ⇒ BankCheckV1PagePrediction
Returns a new instance of BankCheckV1PagePrediction.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/mindee/product/us/bank_check/bank_check_v1_page.rb', line 39 def initialize(prediction, page_id) @check_position = Parsing::Standard::PositionField.new( prediction['check_position'], page_id ) @signatures_positions = [] prediction['signatures_positions'].each do |item| @signatures_positions.push(Parsing::Standard::PositionField.new(item, page_id)) end super end |
Instance Attribute Details
#check_position ⇒ Mindee::Parsing::Standard::PositionField (readonly)
The position of the check on the document.
32 33 34 |
# File 'lib/mindee/product/us/bank_check/bank_check_v1_page.rb', line 32 def check_position @check_position end |
#signatures_positions ⇒ Array<Mindee::Parsing::Standard::PositionField> (readonly)
List of signature positions
35 36 37 |
# File 'lib/mindee/product/us/bank_check/bank_check_v1_page.rb', line 35 def signatures_positions @signatures_positions end |
Instance Method Details
#to_s ⇒ String
52 53 54 55 56 57 58 59 |
# File 'lib/mindee/product/us/bank_check/bank_check_v1_page.rb', line 52 def to_s signatures_positions = @signatures_positions.join("\n #{' ' * 21}") out_str = String.new out_str << "\n:Check Position: #{@check_position}".rstrip out_str << "\n:Signature Positions: #{signatures_positions}".rstrip out_str << "\n#{super}" out_str end |