Method: Navigation::NestedMenu#initialize
- Defined in:
- lib/navigation/nested_menu.rb
#initialize(menu, parent) ⇒ NestedMenu
Returns a new instance of NestedMenu.
5 6 7 8 9 10 11 |
# File 'lib/navigation/nested_menu.rb', line 5 def initialize(, parent) @menu, @parent = , parent # the entire nested menu is stored as a nested ordered hash # since we want multiple items in the same hash, only initialize once MENUS[@menu][@parent][SUBMENU] = ActiveSupport::OrderedHash.new unless MENUS[@menu][@parent].has_key?(SUBMENU) end |