Class: Rakit::Markdown::OutlineNode
- Inherits:
-
Struct
- Object
- Struct
- Rakit::Markdown::OutlineNode
- Defined in:
- lib/rakit/markdown.rb
Overview
Single node in the outline tree. id/href may be set by normalization.
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#href ⇒ Object
Returns the value of attribute href.
-
#id ⇒ Object
Returns the value of attribute id.
-
#source_path ⇒ Object
Returns the value of attribute source_path.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title: "", id: nil, href: nil, source_path: nil, children: nil) ⇒ OutlineNode
constructor
A new instance of OutlineNode.
Constructor Details
#initialize(title: "", id: nil, href: nil, source_path: nil, children: nil) ⇒ OutlineNode
Returns a new instance of OutlineNode.
29 30 31 |
# File 'lib/rakit/markdown.rb', line 29 def initialize(title: "", id: nil, href: nil, source_path: nil, children: nil) super(title: title.to_s, id: id, href: href, source_path: source_path, children: children || []) end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
28 29 30 |
# File 'lib/rakit/markdown.rb', line 28 def children @children end |
#href ⇒ Object
Returns the value of attribute href
28 29 30 |
# File 'lib/rakit/markdown.rb', line 28 def href @href end |
#id ⇒ Object
Returns the value of attribute id
28 29 30 |
# File 'lib/rakit/markdown.rb', line 28 def id @id end |
#source_path ⇒ Object
Returns the value of attribute source_path
28 29 30 |
# File 'lib/rakit/markdown.rb', line 28 def source_path @source_path end |
#title ⇒ Object
Returns the value of attribute title
28 29 30 |
# File 'lib/rakit/markdown.rb', line 28 def title @title end |