Array
# File lib/mail/parts_list.rb, line 4 4: def attachments 5: Mail::AttachmentsList.new(self) 6: end
# File lib/mail/parts_list.rb, line 8 8: def collect 9: if block_given? 10: ary = PartsList.new 11: each { |o| ary << yield(o) } 12: ary 13: else 14: to_a 15: end 16: end
# File lib/mail/parts_list.rb, line 25 25: def collect! 26: raise NoMethodError, "#collect! is not defined, please call #collect and create a new PartsList" 27: end
# File lib/mail/parts_list.rb, line 21 21: def map! 22: raise NoMethodError, "#map! is not defined, please call #collect and create a new PartsList" 23: end
# File lib/mail/parts_list.rb, line 29 29: def sort 30: self.class.new(super) 31: end
# File lib/mail/parts_list.rb, line 33 33: def sort!(order) 34: sorted = self.sort do |a, b| 35: # OK, 10000 is arbitrary... if anyone actually wants to explicitly sort 10000 parts of a 36: # single email message... please show me a use case and I'll put more work into this method, 37: # in the meantime, it works :) 38: get_order_value(a, order) <=> get_order_value(b, order) 39: end 40: self.clear 41: sorted.each { |p| self << p } 42: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.