semmypurewal/jermaine — pull request #23 by Pseudothrax (2012-10-28 05:38:07+00:00)
Title: Collection

Here's code modified to use a single class Collection, in order to implement all behaviors already added to an object by AttrList's addTo method. I also moved the corresponding tests from the attrList specs to a new collection spec file. Took me a bit to get all the tests working in jasmine but they all work and I modified spec/build.html and spec/index.html to incorporate the new collection spec file.

I know our original discussion left us planning to create a new unordered_collection, but some of the newly created methods under addTo are specifically intended for use with an ordered_list. So, until we implement inheritance for the collection classes, I just focused on the task of separating the collection from the actual AttrList. I figure next we can work on inheritance and try and get a separate ordered_collection.js file implemented. Then collection.js can become default.js or unordered.js or whatever.

In which collection type does toSON belong?