You are viewing a single comment's thread. Return to all comments →
def group_by_marks(marks, pass_marks) marks.group_by {|key, x| (x >= pass_marks) == true ? "Passed" : "Failed" } end
Seems like cookies are disabled on this browser, please enable them to open this website
Ruby - Enumerable - group_by
You are viewing a single comment's thread. Return to all comments →