class AUB::Payroll::EPFFile::Header
Attributes
company_name[RW]
date[RW]
Public Class Methods
new(*)
click to toggle source
@param [String] company_name
: @param [Date] date:
Calls superclass method
# File lib/aub/payroll/epf_file/header.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/header.rb, line 20 def to_s [ 'BF', # marks the beginning of file formatted_company_name, formatted_date, ].join end
Private Instance Methods
formatted_company_name()
click to toggle source
# File lib/aub/payroll/epf_file/header.rb, line 30 def formatted_company_name String(company_name).upcase.ljust 40 end
formatted_date()
click to toggle source
# File lib/aub/payroll/epf_file/header.rb, line 34 def formatted_date date.strftime '%Y%m%d' end