Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- col_prefix = 't_br_q_'
- cols = []
- cols[:inhibit_sub] = ['09', '38', '42', '43', '45', '47', '57', '58', '59', '69']
- cols[:shift_sub] = ['04', '05', '06', '13', '14', '24', '30', '40', '53', '62']
- cols[:emotion_sub] = ['01', '07', '26', '27', '48', '51', '64', '66', '72']
- cols[:initiate_sub] = ['03', '10', '19', '34', '50', '63', '70']
- cols[:work_mem_sub] = ['02', '08', '18', '21', '25', '28', '31', '32', '39', '60']
- cols[:plan_sub] = ['12', '17', '23', '29', '35', '37', '41', '49', '52', '56']
- cols[:org_mat_sub] = ['11', '16', '20', '67', '68', '71', '73']
- cols[:monitor_sub] = ['15', '22', '33', '36', '44', '46', '54', '55', '61', '65']
- [:inhibit_sub, :shift_sub, :emotion_sub, :initiate_sub, :work_mem_sub, :plan_sub, :org_mat_sub, :monitor_sub].each do |attr|
- cols[attr].inject {|sum, c| sum + self.send((col_prefix + c).symbolize)}
- end
Add Comment
Please, Sign In to add comment