Class: Mindee::Product::US::DriverLicense::DriverLicenseV1PagePrediction
- Inherits:
-
DriverLicenseV1Document
- Object
- Mindee::Parsing::Common::Prediction
- DriverLicenseV1Document
- Mindee::Product::US::DriverLicense::DriverLicenseV1PagePrediction
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/us/driver_license/driver_license_v1_page.rb
Overview
Driver License V1 page prediction.
Instance Attribute Summary collapse
-
#photo ⇒ Mindee::Parsing::Standard::PositionField
readonly
Has a photo of the US driver license holder.
-
#signature ⇒ Mindee::Parsing::Standard::PositionField
readonly
Has a signature of the US driver license holder.
Attributes inherited from DriverLicenseV1Document
#address, #date_of_birth, #dd_number, #dl_class, #driver_license_id, #endorsements, #expiry_date, #eye_color, #first_name, #hair_color, #height, #issued_date, #last_name, #restrictions, #sex, #state, #weight
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ DriverLicenseV1PagePrediction
constructor
A new instance of DriverLicenseV1PagePrediction.
- #to_s ⇒ String
Constructor Details
#initialize(prediction, page_id) ⇒ DriverLicenseV1PagePrediction
Returns a new instance of DriverLicenseV1PagePrediction.
35 36 37 38 39 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_page.rb', line 35 def initialize(prediction, page_id) @photo = PositionField.new(prediction['photo'], page_id) @signature = PositionField.new(prediction['signature'], page_id) super(prediction, page_id) end |
Instance Attribute Details
#photo ⇒ Mindee::Parsing::Standard::PositionField (readonly)
Has a photo of the US driver license holder
28 29 30 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_page.rb', line 28 def photo @photo end |
#signature ⇒ Mindee::Parsing::Standard::PositionField (readonly)
Has a signature of the US driver license holder
31 32 33 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_page.rb', line 31 def signature @signature end |
Instance Method Details
#to_s ⇒ String
42 43 44 45 46 47 48 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_page.rb', line 42 def to_s out_str = String.new out_str << "\n:Photo: #{@photo}".rstrip out_str << "\n:Signature: #{@signature}".rstrip out_str << "\n#{super}" out_str end |