11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/singapore_cpf_calculator/year_common.rb', line 11
def module_for_residency(
status:,
current_date:,
spr_start_date:,
employee_contribution_type:,
employer_contribution_type:
)
residency_modules.find { |mod|
mod.applies_to? status: status,
current_date: current_date,
spr_start_date: spr_start_date,
employee_contribution_type: employee_contribution_type,
employer_contribution_type: employer_contribution_type
} or raise ArgumentError, "could not find residency module"
end
|