Let\'s say I have an unsorted array from 1 to 10, as shown below...
a = ["3", "5", "8", "4", "1", "2",
As your updated question states:
array.sort_by {|elt| ary = elt.split("-").map(&:to_i); ary[0] + ary[1]}
even geekier:
array.sort_by {|elt| ary = elt.split("-").map(&:to_i).inject(&:+)}