Re: Dynamic methods

16 views
Skip to first unread message

Charles Lowell

unread,
Jun 19, 2012, 4:17:54 PM6/19/12
to javascript-...@googlegroups.com, therub...@googlegroups.com

On Jun 19, 2012, at 2:45 PM, Philipp Pirozhkov wrote:

Thanks! Works like a charm. Shame on me I haven't figured it out myself.

Also remember to yield unless you explicitly want to return nil for a dynamic property. This will allow property resolution to proceed up the prototype chain.

You mean calling 'super' instead of returning nil? Yep, sure

Actually, I mean `yield`. That way it works whether you have a superclass/module with []() defined or not. Remember, we want to go up the JavaScript prototype chain, not the Ruby ancestor chain.



Charles Lowell 
thefrontside.net | twitter: @cowboyd | github: cowboyd




Reply all
Reply to author
Forward
0 new messages