Guest User

Untitled

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