class

Asciidoctor::AbstractBlock

Inherits Asciidoctor::Substitutors < Asciidoctor::AbstractNode < Asciidoctor::Logging < Reference < Object

An abstract base class that provides state and methods for managing a block-level node of AsciiDoc content. Block-level nodes include Document, Section, Block, List, ListItem, and Table.

Constructors

new(context : Symbol, attributes : Hash(String, String) = {} of String => String)
Source

Instance methods

<<(block : AbstractBlock) : self

Append a content block to this block's list of blocks.

Source
alt

Retrieve the alt text for this block image.

Source
assign_caption(value : String | Nil = nil, caption_context : Symbol = @context) : Nil

Generate and assign caption to block if not already assigned.

Source
assign_numeral(section : Section) : Nil

Internal: Assign the next index and numeral to the section.

Source
block?
Source
blocks

The Array of child blocks for this block.

Source
blocks?

Determine whether this Block contains block content.

Source
caption

The caption for this block.

Source
caption=(caption : String | Nil)

The caption for this block.

Source
captioned_title

Convenience method that returns the interpreted title of the Block with the caption prepended.

Source
content

Get the converted result of the child blocks by converting the children appropriate to content model that this block supports.

Source
content_model

Describes the type of content this block accepts.

Source
content_model=(content_model : ContentModel)

Describes the type of content this block accepts.

Source
context=(context : Symbol)

Update the context of this block.

Source
convert

Delegate to the converter to convert this block.

Source
file

Get the source file where this block started.

Source
find_by(context : Symbol | Nil = nil, style : String | Nil = nil, role : String | Nil = nil, id : String | Nil = nil) : Array(AbstractBlock)

Walk the document tree and find all block-level nodes that match the specified selector.

Source
inline?
Source
level

The Integer level of this Section or the Section to which this block belongs.

Source
level=(level : Int32)

The Integer level of this Section or the Section to which this block belongs.

Source
lineno

Get the source line number where this block started.

Source
list_marker_keyword(list_type : String | Nil = nil) : String | Nil

Retrieve the list marker keyword for the specified list type.

Source
next_adjacent_block

Get the next adjacent block in the document tree (sibling or parent's next sibling).

Source
number

Alias for numeral (deprecated but present in Ruby).

Source
number=(val : String | Nil)

Alias for numeral= (deprecated but present in Ruby).

Source
numeral

The String numeral of this block (if section, relative to parent, otherwise absolute).

Source
numeral=(numeral : String | Nil)

The String numeral of this block (if section, relative to parent, otherwise absolute).

Source
reindex_sections

Internal: Reassign the section indexes.

Source
remove_sub(sub : Substitution) : Nil

Remove a substitution from this block.

Source
sections

Get the Array of child Section objects.

Source
sections?

Check whether this block has any child Section objects.

Source
source_location

The location in the AsciiDoc source where this block begins.

Source
source_location=(source_location : SourceLocation | Nil)

The location in the AsciiDoc source where this block begins.

Source
style

The String style (block type qualifier) for this block.

Source
style=(style : String | Nil)

The String style (block type qualifier) for this block.

Source
sub?(name : Substitution) : Bool

A convenience method that checks whether the specified substitution is enabled for this block.

Source
subs

Substitutions to be applied to content in this block.

Source
subs_list

Substitutions list (symbol-based, used by Substitutors module).

Source
subs_list=(subs_list : Array(Symbol))

Substitutions list (symbol-based, used by Substitutors module).

Source
title

Get the String title of this Block with title substitutions applied.

Source
title=(val : String | Nil)

Set the String block title.

Source
title?

A convenience method that checks whether the title is set.

Source
xreftext(xrefstyle : String | Nil = nil) : String | Nil

Generate cross reference text (xreftext) that can be used to refer to this block.

Source