Class: Mindee::Product::FR::EnergyBill::EnergyBillV1MeterDetail
- Inherits:
-
Mindee::Parsing::Standard::FeatureField
- Object
- Mindee::Parsing::Standard::AbstractField
- Mindee::Parsing::Standard::FeatureField
- Mindee::Product::FR::EnergyBill::EnergyBillV1MeterDetail
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb
Overview
Information about the energy meter.
Instance Attribute Summary collapse
-
#meter_number ⇒ String
readonly
The unique identifier of the energy meter.
-
#meter_type ⇒ String
readonly
The type of energy meter.
-
#unit ⇒ String
readonly
The unit of measurement for energy consumption, which can be kW, m³, or L.
Attributes inherited from Mindee::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ EnergyBillV1MeterDetail
constructor
A new instance of EnergyBillV1MeterDetail.
- #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) ⇒ EnergyBillV1MeterDetail
Returns a new instance of EnergyBillV1MeterDetail.
24 25 26 27 28 29 30 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb', line 24 def initialize(prediction, page_id) super(prediction, page_id) @meter_number = prediction['meter_number'] @meter_type = prediction['meter_type'] @unit = prediction['unit'] @page_id = page_id end |
Instance Attribute Details
#meter_number ⇒ String (readonly)
The unique identifier of the energy meter.
14 15 16 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb', line 14 def meter_number @meter_number end |
#meter_type ⇒ String (readonly)
The type of energy meter.
17 18 19 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb', line 17 def meter_type @meter_type end |
#unit ⇒ String (readonly)
The unit of measurement for energy consumption, which can be kW, m³, or L.
20 21 22 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb', line 20 def unit @unit end |
Instance Method Details
#printable_values ⇒ Hash
33 34 35 36 37 38 39 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb', line 33 def printable_values printable = {} printable[:meter_number] = format_for_display(@meter_number) printable[:meter_type] = format_for_display(@meter_type) printable[:unit] = format_for_display(@unit) printable end |
#to_s ⇒ String
42 43 44 45 46 47 48 49 |
# File 'lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb', line 42 def to_s printable = printable_values out_str = String.new out_str << "\n :Meter Number: #{printable[:meter_number]}" out_str << "\n :Meter Type: #{printable[:meter_type]}" out_str << "\n :Unit of Measure: #{printable[:unit]}" out_str end |