Ruby - Enumerable - group_by

  • + 1 comment
    marks.group_by { |key, value| value > pass_marks ? "Passed" : "Failed"}