Class: Coradoc::CoreModel::ListBlock
- Defined in:
- lib/coradoc/core_model/list_block.rb
Overview
Represents a list block with proper nesting support
Handles all AsciiDoc list types:
-
Unordered lists (*, **, ***)
-
Ordered lists (., .., …)
-
Description lists
-
Labeled lists
Lists can contain nested lists at multiple levels, with each level tracked through marker_level.
Instance Attribute Summary collapse
-
#items ⇒ Array<ListItem>
Collection of list items.
-
#marker_level ⇒ Integer
Nesting level of the list (default: 1).
-
#marker_type ⇒ String?
Type of list marker (e.g., ‘asterisk’, ‘dash’, ‘numbered’, ‘labeled’).
-
#start ⇒ Integer?
Starting number for ordered lists.
Attributes inherited from Base
#element_attributes, #id, #metadata_entries, #title
Method Summary
Methods inherited from Base
#accept, #attr, #metadata, #semantically_equivalent?, #set_attr, #set_metadata
Instance Attribute Details
#items ⇒ Array<ListItem>
Returns collection of list items.
110 |
# File 'lib/coradoc/core_model/list_block.rb', line 110 attribute :items, ListItem, collection: true |
#marker_level ⇒ Integer
Returns nesting level of the list (default: 1).
102 |
# File 'lib/coradoc/core_model/list_block.rb', line 102 attribute :marker_level, :integer, default: -> { 1 } |
#marker_type ⇒ String?
Returns type of list marker (e.g., ‘asterisk’, ‘dash’, ‘numbered’, ‘labeled’).
98 |
# File 'lib/coradoc/core_model/list_block.rb', line 98 attribute :marker_type, :string |
#start ⇒ Integer?
Returns starting number for ordered lists.
106 |
# File 'lib/coradoc/core_model/list_block.rb', line 106 attribute :start, :integer |