# File lib/asciidoctor/table.rb, line 109
  def partition_header_footer(attributes)
    # set rowcount before splitting up body rows
    @attributes['rowcount'] = @rows.body.size

    if !rows.body.empty? && attributes.has_key?('header-option')
      head = rows.body.shift
      # styles aren't applied to header row
      head.each {|c| c.attributes.delete('style') }
      # QUESTION why does AsciiDoc use an array for head? is it
      # possible to have more than one based on the syntax?
      rows.head = [head]
    end

    if !rows.body.empty? && attributes.has_key?('footer-option')
      rows.foot = [rows.body.pop]
    end
    
    nil
  end