Class: Adva::View::Menu

Inherits:
Minimal::Template
  • Object
show all
Defined in:
lib/adva/view/menu.rb,
lib/adva/view/menu/admin.rb,
lib/adva/view/menu/items.rb

Direct Known Subclasses

Admin, Layouts::Default::Menu

Defined Under Namespace

Classes: Admin, Items

Instance Method Summary collapse

Instance Method Details

#item(text, url = nil, options = {}, &block) ⇒ Object



12
13
14
# File 'lib/adva/view/menu.rb', line 12

def item(text, url = nil, options = {}, &block)
  items.insert(text, url, options, block)
end

#label(text, url = nil, options = {}, &block) ⇒ Object



16
17
18
# File 'lib/adva/view/menu.rb', line 16

def label(text, url = nil, options = {}, &block)
  item(text, url, options.merge(:type => :label), &block)
end

#to_htmlObject



7
8
9
10
# File 'lib/adva/view/menu.rb', line 7

def to_html
  build
  render_items
end