def rows(collection = nil, &block)
      return @rows if collection.nil?

      unless collection.respond_to?(:each)
        raise ArgumentError, 'csv.rows only accepts Enumerable object (that respond to #each). Use csv.row for a single object.'
      end

      collection.each do |element|
        row(element, &block)
      end

      @rows
    end
def rows(collection = nil, &block)
      return @rows if collection.nil?

      unless collection.respond_to?(:each)
        raise ArgumentError, 'csv.rows only accepts Enumerable object (that respond to #each). Use csv.row for a single object.'
      end

      collection.each do |element|
        row(element, &block)
      end

      @rows
    end
Public: adds several rows to the CSV

 `collection` - an Enumerable of objects to be passed to #row

 Returns an updated Array of Row objects