class Asciidoctor::Table::Rows

Public: A data object that encapsulates the collection of rows (head, foot, body) for a table

Attributes

body[RW]
foot[RW]
head[RW]

Public Class Methods

new(head = [], foot = [], body = []) click to toggle source
# File lib/asciidoctor/table.rb, line 10
def initialize head = [], foot = [], body = []
  @head = head
  @foot = foot
  @body = body
end

Public Instance Methods

by_section() click to toggle source

Public: Returns the rows grouped by section.

Creates a 2-dimensional array of two element entries. The first element is the section name as a symbol. The second element is the Array of rows in that section. The entries are in document order (head, foot, body).

Returns a 2-dimentional Array of rows grouped by section.

# File lib/asciidoctor/table.rb, line 25
def by_section
  [[:head, @head], [:foot, @foot], [:body, @body]]
end