More Ruby in Prototype

September 26th, 2006 . 14 comments

It’s obvious that Ruby has been a big influence to Prototype. We’ve already talked about Enumerables, Arrays, and Hashes, and how powerful they are. Now, lets look at some new tools: inGroupsOf and eachSlice.

Continue reading article…

Prototype Meets Ruby: A Look at Enumerable, Array and Hash

December 7th, 2005 . 26 comments

Not to long ago, Prototype implemented some Ruby-like features, most notably Enumerable. This makes Javascript much more pleasant to deal with, but currently there is almost no documentation on how to use these features. Luckily, Sam believes in testing his code and he has some test cases lying around his darcs repository that helped me get up to speed. I’ll try to explain some of the methods in this post.

Continue reading article…