Class: Coradoc::Html::Drop::TocEntryDrop
- Inherits:
-
Base
- Object
- Liquid::Drop
- Base
- Coradoc::Html::Drop::TocEntryDrop
show all
- Defined in:
- lib/coradoc/html/drop/toc_entry_drop.rb
Instance Attribute Summary
Attributes inherited from Base
#model
Instance Method Summary
collapse
Methods inherited from Base
#id, #initialize, #template_type, #to_liquid
Instance Method Details
#children ⇒ Object
19
20
21
|
# File 'lib/coradoc/html/drop/toc_entry_drop.rb', line 19
def children
children_to_liquid(@model.children)
end
|
#level ⇒ Object
15
16
17
|
# File 'lib/coradoc/html/drop/toc_entry_drop.rb', line 15
def level
@model.level
end
|
#number ⇒ Object
11
12
13
|
# File 'lib/coradoc/html/drop/toc_entry_drop.rb', line 11
def number
@model.number
end
|
#numbered_title ⇒ Object
23
24
25
26
|
# File 'lib/coradoc/html/drop/toc_entry_drop.rb', line 23
def numbered_title
n = number
n ? "#{n}. #{title}" : title
end
|
#title ⇒ Object
7
8
9
|
# File 'lib/coradoc/html/drop/toc_entry_drop.rb', line 7
def title
TitleText.escape(@model.title)
end
|