Class: Coradoc::CoreModel::TocEntry
- Defined in:
- lib/coradoc/core_model/toc.rb,
lib/coradoc/core_model/toc.rb
Overview
Re-open TocEntry to properly type children now that TocEntry is defined
Instance Attribute Summary collapse
-
#children ⇒ Array<TocEntry>
Nested child entries.
-
#id ⇒ String?
The anchor ID for linking.
-
#level ⇒ Integer
The heading level (1-6).
-
#number ⇒ String?
The section number (e.g., “1.2.3”).
-
#title ⇒ String?
The heading text.
Attributes inherited from Base
#element_attributes, #metadata_entries
Method Summary
Methods inherited from Base
#accept, #attr, #metadata, #semantically_equivalent?, #set_attr, #set_metadata
Instance Attribute Details
#children ⇒ Array<TocEntry>
Returns nested child entries.
82 |
# File 'lib/coradoc/core_model/toc.rb', line 82 attribute :children, :string, collection: true |
#id ⇒ String?
Returns the anchor ID for linking.
66 |
# File 'lib/coradoc/core_model/toc.rb', line 66 attribute :id, :string |
#level ⇒ Integer
Returns the heading level (1-6).
74 |
# File 'lib/coradoc/core_model/toc.rb', line 74 attribute :level, :integer, default: -> { 1 } |
#number ⇒ String?
Returns the section number (e.g., “1.2.3”).
78 |
# File 'lib/coradoc/core_model/toc.rb', line 78 attribute :number, :string |
#title ⇒ String?
Returns the heading text.
70 |
# File 'lib/coradoc/core_model/toc.rb', line 70 attribute :title, :string |