Skip to content

Instantly share code, notes, and snippets.

@apeiros
Created June 26, 2013 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeiros/1101e9d4fe7a4816df31 to your computer and use it in GitHub Desktop.
Save apeiros/1101e9d4fe7a4816df31 to your computer and use it in GitHub Desktop.
sort_order = %w{ B E F A C K I M Q D L Z P O }
slt = Hash[sort_order.each_with_index.map { |x,i| [x,i] }]
%w{ Z A B C D E }.sort_by { |x| slt[x] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment