prismicio/javascript-kit — pull request #27 by rudyrigot (2014-04-12 00:50:53+00:00)
Title: Support for Group fragments

I also did a bit of test and doc refactoring that were just too intertwined with this PR to do it on another branch.

Mostly please review this commit: d9814b3d79793dc6f63a7a59a4bf000b6a33f812

My biggest doubt: the `toArray()` function to turn the `Group` object into an array that can be accessed and looped through. Each language has a different way of making it easier: in Java the function is called `toMapList()` (because that's what it returns!), in PHP we call it `getArray()` and in Ruby the problem doesn't exist, we simply made the Group class Enumerable (about Scala, I don't understand [how the kit does it](https://github.com/prismicio/scala-kit/blob/master/src/main/scala/Fragments.scala#L209) but it seems to be a very Scala-ic way).

Thanks!