Class: Fidelity::Widget::Navbar
- Inherits:
-
Object
- Object
- Fidelity::Widget::Navbar
- Defined in:
- app/fidelity/widgets/navbar/navbar.rb
Defined Under Namespace
Classes: Item
Instance Attribute Summary collapse
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
- #each ⇒ Object
- #flyout(options = {}, &block) ⇒ Object
-
#initialize(template, options = {}) ⇒ Navbar
constructor
A new instance of Navbar.
- #item(options = {}, &block) ⇒ Object
- #link(options = {}, &block) ⇒ Object
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, ={} @template = template @items = [] end |
Instance Attribute Details
#template ⇒ Object
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
#each ⇒ Object
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 ={}, &block (:flyout, , &block) end |
#item(options = {}, &block) ⇒ Object
11 12 13 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 11 def item ={}, &block (:default, , &block) end |
#link(options = {}, &block) ⇒ Object
15 16 17 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 15 def link ={}, &block (:link, , &block) end |