The "proxy" is being made this way so that you can simply pass it to
most of enumerable methods - i.e. "function iterator(value, index)
{ return <something> }".
You can of course call it on its own.

- kangax

On May 6, 9:57 am, "Justin Perkins" <[EMAIL PROTECTED]> wrote:
> Can you explain this proxy method a bit more for me...
>
> >  Regarding your snippet, what about something like:
>
> >  var SomeClass = Class.create({
> >   initialize: function(index) {
> >     this.index = index;
> >   }
> >  })
>
> >  // it might sense to use iterator-like "proxy" for filtering
> >  SomeClass.condition = function(value, index) {
> >   return index % 2;
> >  }
>
> Is there a way to manually invoke this method or can it only be used
> as an iterator?
>
> -justin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to