Class: Admix::Navigation::Menu
- Inherits:
-
Object
- Object
- Admix::Navigation::Menu
- Defined in:
- lib/admix/navigation/menu.rb
Instance Attribute Summary collapse
-
#can_render ⇒ Object
Returns the value of attribute can_render.
-
#children ⇒ Object
Returns the value of attribute children.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#key ⇒ Object
Returns the value of attribute key.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize ⇒ Menu
constructor
A new instance of Menu.
- #submenu {|submenu| ... } ⇒ Object
Constructor Details
#initialize ⇒ Menu
Returns a new instance of Menu.
6 7 8 |
# File 'lib/admix/navigation/menu.rb', line 6 def initialize @children = [] end |
Instance Attribute Details
#can_render ⇒ Object
Returns the value of attribute can_render.
4 5 6 |
# File 'lib/admix/navigation/menu.rb', line 4 def can_render @can_render end |
#children ⇒ Object
Returns the value of attribute children.
4 5 6 |
# File 'lib/admix/navigation/menu.rb', line 4 def children @children end |
#icon ⇒ Object
Returns the value of attribute icon.
4 5 6 |
# File 'lib/admix/navigation/menu.rb', line 4 def icon @icon end |
#key ⇒ Object
Returns the value of attribute key.
4 5 6 |
# File 'lib/admix/navigation/menu.rb', line 4 def key @key end |
#parent ⇒ Object
Returns the value of attribute parent.
4 5 6 |
# File 'lib/admix/navigation/menu.rb', line 4 def parent @parent end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/admix/navigation/menu.rb', line 4 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/admix/navigation/menu.rb', line 4 def url @url end |
Instance Method Details
#submenu {|submenu| ... } ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/admix/navigation/menu.rb', line 10 def = Admix::Navigation::Menu.new .parent = self yield if block_given? @children << end |