Alex, I like the class definition function method with the exception of returning a hash. It seems like it ought to be one way or the other. But then, I've never had any problem just going long-hand with my class definitions.
One small quibble, I think it might be a little more clear were the class explicitly passed to the closure rather than using this. For most people, this is synonymous with an instance. On Jul 10, 2007, at 8:44 PM, Alex Arnell wrote: > Patch URL (apply against latest inheritance branch revision): > http://dev.rubyonrails.org/attachment/ticket/5459/block-notation.diff > > This patch lets a user optionally define a class inside a closure > instead of a methods hash. Class definition inside a closure allows > for some really interesting code, some of which I've outlined in a > usage patterns pastie to save on message length. > > Usage Pastie URL: > http://pastie.textmate.org/77884 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---
