class AUB::Payroll::EPFFile::Row

Attributes

account_number[RW]
amount[RW]

Public Class Methods

new(*) click to toggle source

@param [String] account_number: @param [BigDecimal] amount:

Calls superclass method
# File lib/aub/payroll/epf_file/row.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/row.rb, line 20
def to_s
  [
    '01',
    account_number,
    formatted_amount,
    '0' * 22
  ].join
end

Private Instance Methods

formatted_amount() click to toggle source
# File lib/aub/payroll/epf_file/row.rb, line 31
def formatted_amount
  format '%014.2f', amount
end