Class: Mindee::Product::EU::LicensePlate::LicensePlateV1

Inherits:
Mindee::Parsing::Common::Inference show all
Defined in:
lib/mindee/product/eu/license_plate/license_plate_v1.rb

Overview

License Plate API version 1 inference prediction.

Class Attribute Summary collapse

Attributes inherited from Mindee::Parsing::Common::Inference

#is_rotation_applied, #pages, #prediction, #product

Instance Method Summary collapse

Methods inherited from Mindee::Parsing::Common::Inference

#to_s

Constructor Details

#initialize(prediction) ⇒ LicensePlateV1

Returns a new instance of LicensePlateV1.

Parameters:

  • prediction (Hash)


18
19
20
21
22
23
24
25
26
27
# File 'lib/mindee/product/eu/license_plate/license_plate_v1.rb', line 18

def initialize(prediction)
  super
  @prediction = LicensePlateV1Document.new(prediction['prediction'], nil)
  @pages = []
  prediction['pages'].each do |page|
    if page.key?('prediction') && !page['prediction'].nil? && !page['prediction'].empty?
      @pages.push(LicensePlateV1Page.new(page))
    end
  end
end

Class Attribute Details

.endpoint_nameString (readonly)

Name of the endpoint for this product.

Returns:

  • (String)


32
33
34
# File 'lib/mindee/product/eu/license_plate/license_plate_v1.rb', line 32

def endpoint_name
  @endpoint_name
end

.endpoint_versionString (readonly)

Version for this product.

Returns:

  • (String)


35
36
37
# File 'lib/mindee/product/eu/license_plate/license_plate_v1.rb', line 35

def endpoint_version
  @endpoint_version
end