class Liquid::TableRow

def render_to_output_buffer(context, output)

def render_to_output_buffer(context, output)
  (collection = context.evaluate(@collection_name)) || (return '')
  from = @attributes.key?('offset') ? to_integer(context.evaluate(@attributes['offset'])) : 0
  to = @attributes.key?('limit') ? from + to_integer(context.evaluate(@attributes['limit'])) : nil
  collection = Utils.slice_collection(collection, from, to)
  length     = collection.length
  cols = @attributes.key?('cols') ? to_integer(context.evaluate(@attributes['cols'])) : length
  output << "<tr class=\"row1\">\n"
  context.stack do
    tablerowloop = Liquid::TablerowloopDrop.new(length, cols)
    context['tablerowloop'] = tablerowloop
    collection.each do |item|
      context[@variable_name] = item
      output << "<td class=\"col#{tablerowloop.col}\">"
      super
      output << '</td>'
      if tablerowloop.col_last && !tablerowloop.last
        output << "</tr>\n<tr class=\"row#{tablerowloop.row + 1}\">"
      end
      tablerowloop.send(:increment!)
    end
  end
  output << "</tr>\n"
  output
end