Class: Mindee::Product::EU::LicensePlate::LicensePlateV1Document
- Inherits:
-
Mindee::Parsing::Common::Prediction
- Object
- Mindee::Parsing::Common::Prediction
- Mindee::Product::EU::LicensePlate::LicensePlateV1Document
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/eu/license_plate/license_plate_v1_document.rb
Overview
License Plate API version 1.1 document data.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#license_plates ⇒ Array<Mindee::Parsing::Standard::StringField>
readonly
List of all license plates found in the image.
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ LicensePlateV1Document
constructor
A new instance of LicensePlateV1Document.
- #to_s ⇒ String
Constructor Details
#initialize(prediction, page_id) ⇒ LicensePlateV1Document
Returns a new instance of LicensePlateV1Document.
18 19 20 21 22 23 24 |
# File 'lib/mindee/product/eu/license_plate/license_plate_v1_document.rb', line 18 def initialize(prediction, page_id) super() @license_plates = [] prediction['license_plates'].each do |item| @license_plates.push(StringField.new(item, page_id)) end end |
Instance Attribute Details
#license_plates ⇒ Array<Mindee::Parsing::Standard::StringField> (readonly)
List of all license plates found in the image.
14 15 16 |
# File 'lib/mindee/product/eu/license_plate/license_plate_v1_document.rb', line 14 def license_plates @license_plates end |
Instance Method Details
#to_s ⇒ String
27 28 29 30 31 32 |
# File 'lib/mindee/product/eu/license_plate/license_plate_v1_document.rb', line 27 def to_s license_plates = @license_plates.join("\n #{' ' * 16}") out_str = String.new out_str << "\n:License Plates: #{license_plates}".rstrip out_str[1..].to_s end |