Class: Middleman::Tocable::TocGenerator
- Inherits:
-
Object
- Object
- Middleman::Tocable::TocGenerator
- Defined in:
- lib/middleman/tocable/toc_generator.rb
Overview
A store of all the blog slides in the site, with accessors for the slides by various dimensions. Accessed via “blog” in templates.
Instance Method Summary collapse
- #add(node) ⇒ Object
-
#initialize(page) ⇒ TocGenerator
constructor
A new instance of TocGenerator.
- #toc ⇒ Object
Constructor Details
#initialize(page) ⇒ TocGenerator
Returns a new instance of TocGenerator.
11 12 13 14 15 16 |
# File 'lib/middleman/tocable/toc_generator.rb', line 11 def initialize page @page = page @toc = [] generate end |
Instance Method Details
#add(node) ⇒ Object
18 19 20 |
# File 'lib/middleman/tocable/toc_generator.rb', line 18 def add node node end |
#toc ⇒ Object
22 23 24 |
# File 'lib/middleman/tocable/toc_generator.rb', line 22 def toc @toc end |