Re: Dynamic methods

Skip to first unread message

Charles Lowell

Jun 19, 2012, 4:17:54 PM6/19/12

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 | twitter: @cowboyd | github: cowboyd

Reply all
Reply to author
0 new messages