Class: AUB::Payroll::EPFFile::Row

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/aub/payroll/epf_file/row.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRow

Returns a new instance of Row.

Parameters:

  • account_number: (String)
  • amount: (BigDecimal)

Raises:



15
16
17
18
# File 'lib/aub/payroll/epf_file/row.rb', line 15

def initialize(*)
  super
  raise Errors::Invalid, errors.full_messages.to_sentence unless valid?
end

Instance Attribute Details

#account_numberObject

Returns the value of attribute account_number.



8
9
10
# File 'lib/aub/payroll/epf_file/row.rb', line 8

def 
  @account_number
end

#amountObject

Returns the value of attribute amount.



8
9
10
# File 'lib/aub/payroll/epf_file/row.rb', line 8

def amount
  @amount
end

Instance Method Details

#to_sObject



20
21
22
23
24
25
26
27
# File 'lib/aub/payroll/epf_file/row.rb', line 20

def to_s
  [
    '01',
    ,
    formatted_amount,
    '0' * 22
  ].join
end