# File lib/mail/parts_list.rb, line 33 def sort!(order) sorted = self.sort do |a, b| # OK, 10000 is arbitrary... if anyone actually wants to explicitly sort 10000 parts of a # single email message... please show me a use case and I'll put more work into this method, # in the meantime, it works :) get_order_value(a, order) <=> get_order_value(b, order) end self.clear sorted.each { |p| self << p } end