Class: JekyllAsciidoctorPdf::SidebarEntry
- Inherits:
-
Object
- Object
- JekyllAsciidoctorPdf::SidebarEntry
- Defined in:
- lib/jekyll_asciidoctor_pdf/sidebar.rb
Overview
General Tree Data Structure
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #add_child(child) ⇒ Object
- #add_content(content) ⇒ Object
-
#initialize(title, page, content, root) ⇒ SidebarEntry
constructor
A new instance of SidebarEntry.
Constructor Details
#initialize(title, page, content, root) ⇒ SidebarEntry
Returns a new instance of SidebarEntry.
20 21 22 23 24 25 26 |
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 20 def initialize(title, page, content, root) @children = [] @root = root @page = page @title = title @content = content end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
18 19 20 |
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18 def children @children end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
18 19 20 |
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18 def content @content end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
18 19 20 |
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18 def page @page end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
18 19 20 |
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18 def root @root end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
18 19 20 |
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18 def title @title end |
Instance Method Details
#add_child(child) ⇒ Object
33 34 35 |
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 33 def add_child(child) @children << child end |
#add_content(content) ⇒ Object
28 29 30 31 |
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 28 def add_content(content) @content << "\n" @content << content end |