Class: Mindee::Product::FR::Payslip::PayslipV2PayPeriod
- Inherits:
-
Mindee::Parsing::Standard::FeatureField
- Object
- Mindee::Parsing::Standard::AbstractField
- Mindee::Parsing::Standard::FeatureField
- Mindee::Product::FR::Payslip::PayslipV2PayPeriod
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb
Overview
Information about the pay period.
Instance Attribute Summary collapse
-
#end_date ⇒ String
readonly
The end date of the pay period.
-
#month ⇒ String
readonly
The month of the pay period.
-
#payment_date ⇒ String
readonly
The date of payment for the pay period.
-
#start_date ⇒ String
readonly
The start date of the pay period.
-
#year ⇒ String
readonly
The year of the pay period.
Attributes inherited from Mindee::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ PayslipV2PayPeriod
constructor
A new instance of PayslipV2PayPeriod.
- #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) ⇒ PayslipV2PayPeriod
Returns a new instance of PayslipV2PayPeriod.
30 31 32 33 34 35 36 37 38 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb', line 30 def initialize(prediction, page_id) super(prediction, page_id) @end_date = prediction['end_date'] @month = prediction['month'] @payment_date = prediction['payment_date'] @start_date = prediction['start_date'] @year = prediction['year'] @page_id = page_id end |
Instance Attribute Details
#end_date ⇒ String (readonly)
The end date of the pay period.
14 15 16 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb', line 14 def end_date @end_date end |
#month ⇒ String (readonly)
The month of the pay period.
17 18 19 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb', line 17 def month @month end |
#payment_date ⇒ String (readonly)
The date of payment for the pay period.
20 21 22 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb', line 20 def payment_date @payment_date end |
#start_date ⇒ String (readonly)
The start date of the pay period.
23 24 25 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb', line 23 def start_date @start_date end |
#year ⇒ String (readonly)
The year of the pay period.
26 27 28 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb', line 26 def year @year end |
Instance Method Details
#printable_values ⇒ Hash
41 42 43 44 45 46 47 48 49 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb', line 41 def printable_values printable = {} printable[:end_date] = format_for_display(@end_date) printable[:month] = format_for_display(@month) printable[:payment_date] = format_for_display(@payment_date) printable[:start_date] = format_for_display(@start_date) printable[:year] = format_for_display(@year) printable end |
#to_s ⇒ String
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb', line 52 def to_s printable = printable_values out_str = String.new out_str << "\n :End Date: #{printable[:end_date]}" out_str << "\n :Month: #{printable[:month]}" out_str << "\n :Payment Date: #{printable[:payment_date]}" out_str << "\n :Start Date: #{printable[:start_date]}" out_str << "\n :Year: #{printable[:year]}" out_str end |