Class: JekyllAsciidoctorPdf::SidebarEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll_asciidoctor_pdf/sidebar.rb

Overview

General Tree Data Structure

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#childrenObject (readonly)

Returns the value of attribute children.



18
19
20
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18

def children
  @children
end

#contentObject (readonly)

Returns the value of attribute content.



18
19
20
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18

def content
  @content
end

#pageObject (readonly)

Returns the value of attribute page.



18
19
20
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18

def page
  @page
end

#rootObject (readonly)

Returns the value of attribute root.



18
19
20
# File 'lib/jekyll_asciidoctor_pdf/sidebar.rb', line 18

def root
  @root
end

#titleObject (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