Method: Amber::Menu#submenu
- Defined in:
- lib/amber/menu.rb
#submenu(item_name = nil) ⇒ Object
returns the menu under the item that matches item_name.
33 34 35 36 37 38 39 |
# File 'lib/amber/menu.rb', line 33 def (item_name=nil) if item_name self.children.detect {|child| child.name == item_name} else self.children end end |