R
Raj Singh
Anytime I see the delegate code usually there is an unless along with
it. The code might look like this.
Object.instance_methods.each do |m|
delegate m, :to => model unless m =~ /^__/
end
I am thinking that __ is escaped so that one could called
object.__SEND__ and this call will not be sent to the delegate. Is that
the reason why __ is not delegated to the delegate or the actual
reasoning is something else?
That piece of code as picked up from http://m.onkey.org/2008/10/5/sanity
it. The code might look like this.
Object.instance_methods.each do |m|
delegate m, :to => model unless m =~ /^__/
end
I am thinking that __ is escaped so that one could called
object.__SEND__ and this call will not be sent to the delegate. Is that
the reason why __ is not delegated to the delegate or the actual
reasoning is something else?
That piece of code as picked up from http://m.onkey.org/2008/10/5/sanity