Hello Peter and Michael, Thanks for your comments. Keep tuned up with my blog. I will be investigating on more design patterns to implement in Ruby (not in Rails style) :D and of course need to thoughts to share.
Samiron paul http://samironpaul.blogspot.com On May 10, 1:19 am, Peter De Berdt <[email protected]> wrote: > On 09 May 2010, at 20:54, Michael Pavling wrote: > > > On 9 May 2010 19:39, Peter De Berdt <[email protected]> wrote: > >> About your implementation, I prefer the syntax from the post above, > >> simply > >> because it reads more natural. Other than that, yours does seem a > >> viable > >> solution (only skimmed it, but seems fine) :-) > > > It's an interesting pure Ruby implementation, but it's not a great > > Rails implementation, because it's overloading "method_missing" > > without a call to super. > > To be a bit moreresilient > > resilient, I'd add a check that @decorated responds > > to the method before sending, and then call super to let Rails get on > > with any of its magic that you might be fubaring otherwise. > > Agreed. > > Best regards > > Peter De Berdt > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" 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 > athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.

