https://github.com/mikel/mail
Ruby
A Really Ruby Mail Library
Mail::Body#sort_parts!
Allows you to sort the parts according to the default sort order, or the sort order you set with :set_sort_order. sort_parts! is also called from :encode, so there is no need for you to call this explicitly
Edit
git clone [email protected]:mikel/mail.git
cd mail
open lib/mail/body.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Mail--Body-sort_parts--for-pr
# Commit to gitgit add lib/mail/body.rbgit commit -m "better docs for Mail::Body#sort_parts!"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Mail--Body-sort_parts--for-pr
hub pull-request
# Celebrate!