mikel/mail — pull request #782 by robin850 (2014-08-17 14:17:11+00:00)
Title: Use composition over inheritance for `PartsList`

Hello,

This pull request makes this gem compatible with Rubinius relying on the composition over inheritance technique. Even Rails no longer uses the inheritance pattern (see [this article](http://tenderlovemaking.com/2014/06/02/yagni-methods-are-killing-me.html) and rails/rails#16299).

For now, there is a compatibility layer that delegates any missing methods to the parts list's `@parts` so it behaves like an array. This is up to you but you may need to deprecate this path and tell people to access `#parts` first, then call the given method or provide your very own API (through `Enumerable` for instance).

If you want me to squash some commits together let me know !

Refs rubinius/rubinius#3050.

This has been tested under MRI 2.1.2 and 1.9.3, JRuby 1.7.13 and Rubinius 2.2.10.

Have a nice day.