class AUB::Payroll::EPFFile::Footer
Attributes
number_of_records[RW]
total_amount[RW]
Public Class Methods
new(*)
click to toggle source
@param [Integer] number_of_records
: @param [BigDecimal] total_amount
:
Calls superclass method
# File lib/aub/payroll/epf_file/footer.rb, line 15 def initialize(*) super raise Errors::Invalid, errors.full_messages.to_sentence unless valid? end
Public Instance Methods
to_s()
click to toggle source
# File lib/aub/payroll/epf_file/footer.rb, line 20 def to_s [ 'EF', # marks the end of file formatted_number_of_records, formatted_total_amount, '0' * 27, ].join end
Private Instance Methods
formatted_number_of_records()
click to toggle source
# File lib/aub/payroll/epf_file/footer.rb, line 31 def formatted_number_of_records format '%06d', number_of_records end
formatted_total_amount()
click to toggle source
# File lib/aub/payroll/epf_file/footer.rb, line 35 def formatted_total_amount format '%015.2f', total_amount end