Class Asciidoctor::Table
In: lib/asciidoctor/table.rb
Parent: AbstractBlock

Public: Methods and constants for managing AsciiDoc table content in a document. It supports all three of AsciiDoc‘s table formats: psv, dsv and csv.

Methods

Classes and Modules

Class Asciidoctor::Table::Cell
Class Asciidoctor::Table::Column
Class Asciidoctor::Table::ParserContext

Constants

DEFAULT_DATA_FORMAT = 'psv'   Public: A String key that specifies the default table format in AsciiDoc (psv)
DATA_FORMATS = ['psv', 'dsv', 'csv']   Public: An Array of String keys that represent the table formats in AsciiDoc
DEFAULT_DELIMITERS = { 'psv' => '|', 'dsv' => ':', 'csv' => ','   Public: A Hash mapping the AsciiDoc table formats to their default delimiters
TEXT_STYLES = { 'd' => :none, 's' => :strong, 'e' => :emphasis, 'm' => :monospaced, 'h' => :header, 'l' => :literal, 'v' => :verse, 'a' => :asciidoc   Public: A Hash mapping styles abbreviations to styles that can be applied to a table column or cell
ALIGNMENTS = { :h => { '<' => 'left', '>' => 'right', '^' => 'center'   Public: A Hash mapping alignment abbreviations to alignments (horizontal and vertial) that can be applies to a table column or cell

Attributes

columns  [RW]  Public: Get/Set the columns for this table
header_option  [R]  Public: Boolean specifies whether this table has a header row
rows  [RW]  Public: Get/Set the Rows struct for this table (encapsulates head, foot and body rows)

Public Class methods

Public Instance methods

Internal: Creates the Column objects from the column spec

returns nothing

Internal: Returns whether the current row being processed is the header row

Internal: Partition the rows into header, footer and body as determined by the options on the table

returns nothing

Public: Get the rendered String content for this Block. If the block has child blocks, the content method should cause them to be rendered and returned as content that can be included in the parent block‘s template.

[Validate]