Method: Navigation::NestedMenu#item

Defined in:
lib/navigation/nested_menu.rb

#item(key, options = {}) ⇒ Object

Raises:

  • (InvalkeyBlock)


13
14
15
16
17
# File 'lib/navigation/nested_menu.rb', line 13

def item(key, options = {})
  # only support one level of nesting (the action-level)
  raise InvalkeyBlock, InvalkeyBlock.message if block_given?
  MENUS[@menu][@parent][SUBMENU].merge!(normalize(key) => options)
end