Class: Menumatic::Navigation::Item::Base
- Inherits:
-
Object
- Object
- Menumatic::Navigation::Item::Base
- Includes:
- Navigators, Renderers
- Defined in:
- lib/menumatic/navigation/item.rb
Instance Attribute Summary collapse
-
#html_options ⇒ Object
Returns the value of attribute html_options.
-
#items ⇒ Object
Returns the value of attribute items.
-
#wrapper_options ⇒ Object
Returns the value of attribute wrapper_options.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Base
constructor
A new instance of Base.
- #is_group? ⇒ Boolean
- #is_link? ⇒ Boolean
Methods included from Navigators
Methods included from Renderers
#count_active_descendants, #depth_count, #has_active_descendant?, #is_active?, #levels_to_i, #on_valid_level?, #paths_match?, #render, #render_sitemap
Constructor Details
#initialize(*args) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 16 17 18 |
# File 'lib/menumatic/navigation/item.rb', line 10 def initialize(*args) self. = {} self. = {} if(args.last.is_a?(Hash)) self. = args.last[:link_html] || {} self. = args.last[:wrapper_html] || {} end self.items = [] end |
Instance Attribute Details
#html_options ⇒ Object
Returns the value of attribute html_options.
5 6 7 |
# File 'lib/menumatic/navigation/item.rb', line 5 def end |
#items ⇒ Object
Returns the value of attribute items.
5 6 7 |
# File 'lib/menumatic/navigation/item.rb', line 5 def items @items end |
#wrapper_options ⇒ Object
Returns the value of attribute wrapper_options.
5 6 7 |
# File 'lib/menumatic/navigation/item.rb', line 5 def end |
Instance Method Details
#is_group? ⇒ Boolean
24 25 26 |
# File 'lib/menumatic/navigation/item.rb', line 24 def is_group? self.is_a? Menumatic::::Item::Group end |
#is_link? ⇒ Boolean
20 21 22 |
# File 'lib/menumatic/navigation/item.rb', line 20 def is_link? self.is_a? Menumatic::::Item::Link end |