collection(@some_articles) do |collection| collection.values do |values| values.id "http://example.com/json" values.title "Feed" values.updated Time.now values.author { values.name "John Doe" values.email "joedoe@example.com" } values.author { values.name "Foo Bar" values.email "foobar@example.com" } end collection.link("next" , "http://a.link.com/next") collection.link("previous", "http://a.link.com/previous") collection.members(:root => "articles") do |member, article| member.values do |values| values.id "uri:#{article[:id]}" values.title article[:title] values.updated article[:updated] end member.link("image", "http://example.com/image/1") member.link("image", "http://example.com/image/2", :type => "application/json") end end