|
|
@ -238,10 +238,8 @@ private |
|
|
|
def get_totadult |
|
|
|
def get_totadult |
|
|
|
total = !age1.nil? && age1 >= 16 && age1 < 60 ? 1 : 0 |
|
|
|
total = !age1.nil? && age1 >= 16 && age1 < 60 ? 1 : 0 |
|
|
|
total + (2..8).count do |i| |
|
|
|
total + (2..8).count do |i| |
|
|
|
# rubocop:disable Style/EvalWithLocation, Security/Eval:: |
|
|
|
age = public_send("age#{i}") |
|
|
|
age = eval("age#{i}") |
|
|
|
relat = public_send("relat#{i}") |
|
|
|
relat = eval("relat#{i}") |
|
|
|
|
|
|
|
# rubocop:enable Style/EvalWithLocation, Security/Eval:: |
|
|
|
|
|
|
|
!age.nil? && ((age >= 16 && age < 18 && %w[Partner Other].include?(relat)) || age >= 18 && age < 60) |
|
|
|
!age.nil? && ((age >= 16 && age < 18 && %w[Partner Other].include?(relat)) || age >= 18 && age < 60) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|