From: James Edward Gray II Date: 2006-04-21T03:01:17+09:00 Subject: Re: [SUMMARY] Refactoring (#75) On Apr 20, 2006, at 11:04 AM, pat eyler wrote: > On 4/20/06, Molitor, Stephen L wrote: >> James, >> >> Great summary. Wish I had participated in the quiz! >> >> I liked Dave Burt's 'Removed Unused Scope' example. Would you (or >> someone else) care to give examples of 'Replace Similar Methods with >> Metaprogrammed Definitions' > > > I'm not sure what James had in mind, but I think this works well as an > example of post refactoring 'Replace Similar Methods with > Metaprogrammed Definitions': [snip example] Right, or even more trivially: def a=( value ) @a = value end def b=( value ) @b = value end def c=( value ) @c = value end To: attr_writer :a, :b, :c James Edward Gray II