Class: Seiten::HTML::Navigation

Inherits:
Object
  • Object
show all
Defined in:
lib/seiten/html/navigation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view_context, navigation:, parent_id: nil, current_page: nil, deep: 2, html: {}) ⇒ Navigation

Returns a new instance of Navigation.



6
7
8
9
10
11
12
# File 'lib/seiten/html/navigation.rb', line 6

def initialize(view_context, navigation:, parent_id: nil, current_page: nil, deep: 2, html: {})
  @view_context = view_context
  @start_depth = deep
  @html_options = Seiten.config[:html].deep_merge(html || {})
  @current_page = current_page
  @body = build_navigation(navigation, parent_id: parent_id, deep: deep)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/seiten/html/navigation.rb', line 4

def body
  @body
end