Class: Rakit::Markdown::Outline
- Inherits:
-
Struct
- Object
- Struct
- Rakit::Markdown::Outline
- Defined in:
- lib/rakit/markdown.rb
Overview
In-memory outline for rendering (010). title: optional root title; nodes: top-level OutlineNode list.
Instance Attribute Summary collapse
-
#nodes ⇒ Object
Returns the value of attribute nodes.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title: nil, nodes: nil) ⇒ Outline
constructor
A new instance of Outline.
Constructor Details
#initialize(title: nil, nodes: nil) ⇒ Outline
Returns a new instance of Outline.
22 23 24 |
# File 'lib/rakit/markdown.rb', line 22 def initialize(title: nil, nodes: nil) super(title: title.to_s.strip, nodes: nodes || []) end |
Instance Attribute Details
#nodes ⇒ Object
Returns the value of attribute nodes
21 22 23 |
# File 'lib/rakit/markdown.rb', line 21 def nodes @nodes end |
#title ⇒ Object
Returns the value of attribute title
21 22 23 |
# File 'lib/rakit/markdown.rb', line 21 def title @title end |