Class: AmaLayout::NavigationItem
- Inherits:
-
Object
- Object
- AmaLayout::NavigationItem
- Includes:
- ActiveModel::Model
- Defined in:
- lib/ama_layout/navigation_item.rb
Instance Attribute Summary collapse
-
#alt ⇒ Object
Returns the value of attribute alt.
-
#current_url ⇒ Object
Returns the value of attribute current_url.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#link ⇒ Object
Returns the value of attribute link.
-
#sub_nav ⇒ Object
Returns the value of attribute sub_nav.
-
#target ⇒ Object
Returns the value of attribute target.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #decorate ⇒ Object
-
#initialize(args = {}) ⇒ NavigationItem
constructor
A new instance of NavigationItem.
Constructor Details
#initialize(args = {}) ⇒ NavigationItem
Returns a new instance of NavigationItem.
11 12 13 14 |
# File 'lib/ama_layout/navigation_item.rb', line 11 def initialize(args = {}) self.current_url = args[:current_url] super end |
Instance Attribute Details
#alt ⇒ Object
Returns the value of attribute alt.
9 10 11 |
# File 'lib/ama_layout/navigation_item.rb', line 9 def alt @alt end |
#current_url ⇒ Object
Returns the value of attribute current_url.
9 10 11 |
# File 'lib/ama_layout/navigation_item.rb', line 9 def current_url @current_url end |
#icon ⇒ Object
Returns the value of attribute icon.
9 10 11 |
# File 'lib/ama_layout/navigation_item.rb', line 9 def icon @icon end |
#link ⇒ Object
Returns the value of attribute link.
9 10 11 |
# File 'lib/ama_layout/navigation_item.rb', line 9 def link @link end |
#sub_nav ⇒ Object
Returns the value of attribute sub_nav.
9 10 11 |
# File 'lib/ama_layout/navigation_item.rb', line 9 def sub_nav @sub_nav end |
#target ⇒ Object
Returns the value of attribute target.
9 10 11 |
# File 'lib/ama_layout/navigation_item.rb', line 9 def target @target end |
#text ⇒ Object
Returns the value of attribute text.
9 10 11 |
# File 'lib/ama_layout/navigation_item.rb', line 9 def text @text end |
Instance Method Details
#decorate ⇒ Object
5 6 7 |
# File 'lib/ama_layout/navigation_item.rb', line 5 def decorate AmaLayout::NavigationItemDecorator.new(self) end |