Module: Redmine::MenuManager

Defined in:
lib/redmine/menu_manager.rb

Defined Under Namespace

Modules: MenuController, MenuHelper Classes: Mapper, MenuError, MenuItem, MenuNode

Class Method Summary collapse

Class Method Details

.items(menu_name) ⇒ Object



257
258
259
# File 'lib/redmine/menu_manager.rb', line 257

def items(menu_name)
  @items[menu_name.to_sym] || MenuNode.new(:root, {})
end

.map(menu_name) ⇒ Object



247
248
249
250
251
252
253
254
255
# File 'lib/redmine/menu_manager.rb', line 247

def map(menu_name)
  @items ||= {}
  mapper = Mapper.new(menu_name.to_sym, @items)
  if block_given?
    yield mapper
  else
    mapper
  end
end