Class: Mindee::Product::FR::EnergyBill::EnergyBillV1EnergySupplier
- Inherits:
-
Mindee::Parsing::Standard::FeatureField
- Object
- Mindee::Parsing::Standard::AbstractField
- Mindee::Parsing::Standard::FeatureField
- Mindee::Product::FR::EnergyBill::EnergyBillV1EnergySupplier
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb
Overview
The company that supplies the energy.
Instance Attribute Summary collapse
-
#address ⇒ String
readonly
The address of the energy supplier.
-
#name ⇒ String
readonly
The name of the energy supplier.
Attributes inherited from Mindee::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ EnergyBillV1EnergySupplier
constructor
A new instance of EnergyBillV1EnergySupplier.
- #printable_values ⇒ Hash
- #to_s ⇒ String
Methods inherited from Mindee::Parsing::Standard::FeatureField
Methods inherited from Mindee::Parsing::Standard::AbstractField
array_confidence, array_sum, float_to_string
Constructor Details
#initialize(prediction, page_id) ⇒ EnergyBillV1EnergySupplier
Returns a new instance of EnergyBillV1EnergySupplier.
21 22 23 24 25 26 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb', line 21 def initialize(prediction, page_id) super(prediction, page_id) @address = prediction['address'] @name = prediction['name'] @page_id = page_id end |
Instance Attribute Details
#address ⇒ String (readonly)
The address of the energy supplier.
14 15 16 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb', line 14 def address @address end |
#name ⇒ String (readonly)
The name of the energy supplier.
17 18 19 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb', line 17 def name @name end |
Instance Method Details
#printable_values ⇒ Hash
29 30 31 32 33 34 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb', line 29 def printable_values printable = {} printable[:address] = format_for_display(@address) printable[:name] = format_for_display(@name) printable end |
#to_s ⇒ String
37 38 39 40 41 42 43 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb', line 37 def to_s printable = printable_values out_str = String.new out_str << "\n :Address: #{printable[:address]}" out_str << "\n :Name: #{printable[:name]}" out_str end |