Mat Schaffer on 7 Mar 2008 21:41:29 -0800 |
On Mar 6, 2008, at 11:49 PM, Aaron Blohowiak wrote: Now, if class A pushed most of its behavior into a module, you could just import that module into B and define initialize as you please. But, it didnt, so you are stuck with this stuff. I call it clonepatching. The downside to this approach is if you are attempting to discover where B's methods are defined using reflection.. it cannot really express its relationship to A (AFAIK, please correct me if you have a solution to this dilemma.) Well played, my friend. I don't see any clear solution around that. I wonder if you could inherit from X and do some craziness to include A's functions as a module, but that'd probably be way uglier than the module approach. Score one for mixins. Although despite this I still feel like make_resourceful's syntax is a DSL in search of a domain. -Mat _______________________________________________ To unsubscribe or change your settings, visit: http://lists.phillyonrails.org/mailman/listinfo/talk
|
|