Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. matches.sort_by do |match|
  2. if(match[1].nil? && match.last == 6)
  3. "1 #{match.first}"
  4. elsif(not match[1].nil? && match.last == 6)
  5. "2 #{match.first}"
  6. elsif(match.last == 4)
  7. "3 #{match.first}"
  8. elsif(match.last == 7)
  9. "4 #{match.first}"
  10. else
  11. "5 #{match.first}"
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement