Class: Mindee::Product::FR::IdCard::IdCardV1PagePrediction

Inherits:
IdCardV1Document show all
Includes:
Mindee::Parsing::Standard
Defined in:
lib/mindee/product/fr/id_card/id_card_v1_page.rb

Overview

Carte Nationale d’Identité V1 page prediction.

Instance Attribute Summary collapse

Attributes inherited from IdCardV1Document

#authority, #birth_date, #birth_place, #expiry_date, #gender, #given_names, #id_number, #mrz1, #mrz2, #surname

Instance Method Summary collapse

Constructor Details

#initialize(prediction, page_id) ⇒ IdCardV1PagePrediction

Returns a new instance of IdCardV1PagePrediction.

Parameters:

  • prediction (Hash)
  • page_id (Integer, nil)


32
33
34
35
# File 'lib/mindee/product/fr/id_card/id_card_v1_page.rb', line 32

def initialize(prediction, page_id)
  @document_side = ClassificationField.new(prediction['document_side'], page_id)
  super(prediction, page_id)
end

Instance Attribute Details

#document_sideMindee::Parsing::Standard::ClassificationField (readonly)

The side of the document which is visible.



28
29
30
# File 'lib/mindee/product/fr/id_card/id_card_v1_page.rb', line 28

def document_side
  @document_side
end

Instance Method Details

#to_sString

Returns:

  • (String)


38
39
40
41
42
43
# File 'lib/mindee/product/fr/id_card/id_card_v1_page.rb', line 38

def to_s
  out_str = String.new
  out_str << "\n:Document Side: #{@document_side}".rstrip
  out_str << "\n#{super}"
  out_str
end