Class: Mindee::Product::FR::Payslip::PayslipV2Employee
- Inherits:
-
Mindee::Parsing::Standard::FeatureField
- Object
- Mindee::Parsing::Standard::AbstractField
- Mindee::Parsing::Standard::FeatureField
- Mindee::Product::FR::Payslip::PayslipV2Employee
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/fr/payslip/payslip_v2_employee.rb
Overview
Information about the employee.
Instance Attribute Summary collapse
-
#address ⇒ String
readonly
The address of the employee.
-
#date_of_birth ⇒ String
readonly
The date of birth of the employee.
-
#first_name ⇒ String
readonly
The first name of the employee.
-
#last_name ⇒ String
readonly
The last name of the employee.
-
#phone_number ⇒ String
readonly
The phone number of the employee.
-
#registration_number ⇒ String
readonly
The registration number of the employee.
-
#social_security_number ⇒ String
readonly
The social security number of the employee.
Attributes inherited from Mindee::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ PayslipV2Employee
constructor
A new instance of PayslipV2Employee.
- #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) ⇒ PayslipV2Employee
Returns a new instance of PayslipV2Employee.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 36 def initialize(prediction, page_id) super(prediction, page_id) @address = prediction['address'] @date_of_birth = prediction['date_of_birth'] @first_name = prediction['first_name'] @last_name = prediction['last_name'] @phone_number = prediction['phone_number'] @registration_number = prediction['registration_number'] @social_security_number = prediction['social_security_number'] @page_id = page_id end |
Instance Attribute Details
#address ⇒ String (readonly)
The address of the employee.
14 15 16 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 14 def address @address end |
#date_of_birth ⇒ String (readonly)
The date of birth of the employee.
17 18 19 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 17 def date_of_birth @date_of_birth end |
#first_name ⇒ String (readonly)
The first name of the employee.
20 21 22 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 20 def first_name @first_name end |
#last_name ⇒ String (readonly)
The last name of the employee.
23 24 25 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 23 def last_name @last_name end |
#phone_number ⇒ String (readonly)
The phone number of the employee.
26 27 28 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 26 def phone_number @phone_number end |
#registration_number ⇒ String (readonly)
The registration number of the employee.
29 30 31 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 29 def registration_number @registration_number end |
#social_security_number ⇒ String (readonly)
The social security number of the employee.
32 33 34 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 32 def @social_security_number end |
Instance Method Details
#printable_values ⇒ Hash
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 49 def printable_values printable = {} printable[:address] = format_for_display(@address) printable[:date_of_birth] = format_for_display(@date_of_birth) printable[:first_name] = format_for_display(@first_name) printable[:last_name] = format_for_display(@last_name) printable[:phone_number] = format_for_display(@phone_number) printable[:registration_number] = format_for_display(@registration_number) printable[:social_security_number] = format_for_display(@social_security_number) printable end |
#to_s ⇒ String
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employee.rb', line 62 def to_s printable = printable_values out_str = String.new out_str << "\n :Address: #{printable[:address]}" out_str << "\n :Date of Birth: #{printable[:date_of_birth]}" out_str << "\n :First Name: #{printable[:first_name]}" out_str << "\n :Last Name: #{printable[:last_name]}" out_str << "\n :Phone Number: #{printable[:phone_number]}" out_str << "\n :Registration Number: #{printable[:registration_number]}" out_str << "\n :Social Security Number: #{printable[:social_security_number]}" out_str end |