Class: Docter::Page::ToCEntryForPage

Inherits:
ToCEntry show all
Defined in:
lib/docter/page.rb

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, #to_html

Constructor Details

#initialize(page) ⇒ ToCEntryForPage

:nodoc:



58
59
60
# File 'lib/docter/page.rb', line 58

def initialize(page)
  @page = page
end

Instance Method Details

#entriesObject



70
71
72
# File 'lib/docter/page.rb', line 70

def entries()
  @page.toc.entries
end

#titleObject



62
63
64
# File 'lib/docter/page.rb', line 62

def title()
  @page.title
end

#urlObject



66
67
68
# File 'lib/docter/page.rb', line 66

def url()
  @page.path
end