Class: Coradoc::CoreModel::Callout
- Defined in:
- lib/coradoc/core_model/callout.rb
Overview
A single callout annotation attached to a verbatim block.
Callouts are the AsciiDoc convention for annotating individual lines of a source/listing block: ‘<1>` markers appear inside the code and matching `<1> explanation` lines follow the block. Markdown has no native equivalent, so each format gem decides how to render them.
The CoreModel stores each annotation as a typed Callout on its parent block, with the in-code marker ‘<index>` preserved in the block’s ‘content` for verbatim round-trip.
Instance Attribute Summary collapse
-
#content ⇒ String?
Human-readable annotation text.
-
#index ⇒ Integer?
1-based callout number matching the ‘<N>` marker embedded in the parent block’s content.
Attributes inherited from Base
#element_attributes, #id, #metadata_entries, #title
Method Summary
Methods inherited from Base
#accept, #attr, #flat_text, #metadata, #semantically_equivalent?, #set_attr, #set_metadata
Instance Attribute Details
#content ⇒ String?
Returns human-readable annotation text.
23 |
# File 'lib/coradoc/core_model/callout.rb', line 23 attribute :content, :string |
#index ⇒ Integer?
Returns 1-based callout number matching the ‘<N>` marker embedded in the parent block’s content.
19 |
# File 'lib/coradoc/core_model/callout.rb', line 19 attribute :index, :integer |