Class: AbAdmin::Menu::AbstractBuilder

Inherits:
BaseGroup show all
Defined in:
lib/ab_admin/menu/abstract_builder.rb

Direct Known Subclasses

Builder

Instance Method Summary collapse

Methods inherited from BaseGroup

#group, #link, #model, #render_nested

Methods included from Utils::EvalHelpers

#call_method_or_proc_on, #evaluate_method

Constructor Details

#initializeAbstractBuilder

Returns a new instance of AbstractBuilder


4
5
6
# File 'lib/ab_admin/menu/abstract_builder.rb', line 4

def initialize
  @menu_tree = []
end

Instance Method Details

#render(template, options = {}) ⇒ Object


8
9
10
11
# File 'lib/ab_admin/menu/abstract_builder.rb', line 8

def render(template, options={})
  inner = render_nested(template)
  options[:skip_wrap] ? inner.html_safe : %[<ul class="nav">#{inner}</ul>].html_safe
end