Method: Asciidoctor::AbstractBlock#caption

Defined in:
lib/asciidoctor/abstract_block.rb

#captionString

Gets the caption for this block.

This method routes the deprecated use of the caption method on an admonition block to the textlabel attribute.

Returns:

  • (String)

    Returns the String caption for this block (or the value of the textlabel attribute if this is an admonition block).



246
247
248
# File 'lib/asciidoctor/abstract_block.rb', line 246

def caption
  @context == :admonition ? @attributes['textlabel'] : @caption
end