Class: Navi::Renderers::SimpleNavigation::Renderer

Inherits:
Base
  • Object
show all
Defined in:
lib/navi/renderers/simple_navigation/renderer.rb

Instance Attribute Summary

Attributes inherited from Base

#context

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Navi::Renderers::Base

Instance Method Details

#render(collection, *args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/navi/renderers/simple_navigation/renderer.rb', line 6

def render(collection, *args)
  options = Hash[*args]
  options[:expand_all] ||= true

  @dynamic_items_options = {}
  @dynamic_items_options[:namespace] = options.delete(:namespace)

  options[:items] ||= create_dynamic_items(collection)

  template.render_navigation options
end