Class: Fidelity::Widget::Navbar

Inherits:
Object
  • Object
show all
Defined in:
app/fidelity/widgets/navbar/navbar.rb

Defined Under Namespace

Classes: Item

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template, options = {}) ⇒ Navbar

Returns a new instance of Navbar.



6
7
8
9
# File 'app/fidelity/widgets/navbar/navbar.rb', line 6

def initialize template, options={}
  @template = template
  @items = []
end

Instance Attribute Details

#templateObject

Returns the value of attribute template.



5
6
7
# File 'app/fidelity/widgets/navbar/navbar.rb', line 5

def template
  @template
end

Instance Method Details

#eachObject



24
25
26
27
28
# File 'app/fidelity/widgets/navbar/navbar.rb', line 24

def each
  @items.each do |item|
    yield item
  end
end

#flyout(options = {}, &block) ⇒ Object



19
20
21
# File 'app/fidelity/widgets/navbar/navbar.rb', line 19

def flyout options={}, &block
  navbar_item(:flyout, options, &block)
end

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



11
12
13
# File 'app/fidelity/widgets/navbar/navbar.rb', line 11

def item options={}, &block
  navbar_item(:default, options, &block)
end


15
16
17
# File 'app/fidelity/widgets/navbar/navbar.rb', line 15

def link options={}, &block
  navbar_item(:link, options, &block)
end