Class: PPZ::AbstractSectionModel

Inherits:
AbstractWrapperModel show all
Defined in:
lib/doc/model/section/abstract.rb

Direct Known Subclasses

LeafSectionModel, RootSectionModel

Instance Attribute Summary

Attributes inherited from AbstractModel

#father_model, #index, #left_model, #right_model

Instance Method Summary collapse

Methods inherited from AbstractWrapperModel

#initialize, #to_html

Methods inherited from AbstractModel

from_line, #transform_inline_element

Constructor Details

This class inherits a constructor from PPZ::AbstractWrapperModel

Instance Method Details

#append(section) ⇒ Object



2
3
4
5
6
7
# File 'lib/doc/model/section/abstract.rb', line 2

def append section
  super
  if section.is_a? PPZ::AbstractSectionModel
    section.section_dom_id = "#{section_dom_id}-#{section.level.to_s}.#{section.index.to_s}"
  end
end

#get_nav_htmlObject



9
10
11
12
13
14
# File 'lib/doc/model/section/abstract.rb', line 9

def get_nav_html
  @children
    .select { |child| child.is_a? PPZ::AbstractSectionModel }
    .collect { |child| child.get_nav_html }
    .join
end