Class: Docter::Page::ToCEntryForPage
Overview
ToC entry for a page. Obtains title and URL from the page, includes entries from the page ToC and can return the page itself.
Constant Summary
Constants inherited
from ToC
ToC::ARRAY_METHODS
Instance Method Summary
collapse
Methods inherited from ToCEntry
#to_html
Methods inherited from ToC
#add, from_yaml, #to_html
Constructor Details
79
80
81
|
# File 'lib/docter/page.rb', line 79
def initialize(page)
@page = page
end
|
Instance Method Details
#entries ⇒ Object
91
92
93
|
# File 'lib/docter/page.rb', line 91
def entries
@page.toc.entries
end
|
#title ⇒ Object
83
84
85
|
# File 'lib/docter/page.rb', line 83
def title
@page.title
end
|
#url ⇒ Object
87
88
89
|
# File 'lib/docter/page.rb', line 87
def url
@page.path
end
|