Class: Fidelity::Widget::Subnav
- Inherits:
-
Object
- Object
- Fidelity::Widget::Subnav
- Defined in:
- app/fidelity/widgets/subnav/subnav.rb
Defined Under Namespace
Classes: Item
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
-
#template ⇒ Object
Returns the value of attribute template.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(template, options = {}) ⇒ Subnav
constructor
A new instance of Subnav.
- #item(options = {}, &block) ⇒ Object
Constructor Details
#initialize(template, options = {}) ⇒ Subnav
Returns a new instance of Subnav.
6 7 8 9 |
# File 'app/fidelity/widgets/subnav/subnav.rb', line 6 def initialize template, ={} @template = template @items = [] end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
5 6 7 |
# File 'app/fidelity/widgets/subnav/subnav.rb', line 5 def items @items end |
#template ⇒ Object
Returns the value of attribute template.
5 6 7 |
# File 'app/fidelity/widgets/subnav/subnav.rb', line 5 def template @template end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'app/fidelity/widgets/subnav/subnav.rb', line 5 def title @title end |
Instance Method Details
#each ⇒ Object
18 19 20 21 22 |
# File 'app/fidelity/widgets/subnav/subnav.rb', line 18 def each @items.each do |item| yield item end end |