Class: Navigatrix::Rendering::Strategies::List
- Inherits:
-
Struct
- Object
- Struct
- Navigatrix::Rendering::Strategies::List
- Includes:
- ActionView::Helpers::TagHelper, ActionView::Helpers::UrlHelper
- Defined in:
- lib/navigatrix/rendering/strategies/list.rb
Direct Known Subclasses
Defined Under Namespace
Classes: HTMLAttributes, Item
Instance Attribute Summary collapse
-
#items ⇒ Object
writeonly
Sets the attribute items.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#items=(value) ⇒ Object
Sets the attribute items
4 5 6 |
# File 'lib/navigatrix/rendering/strategies/list.rb', line 4 def items=(value) @items = value end |
#options ⇒ Object
Returns the value of attribute options
4 5 6 |
# File 'lib/navigatrix/rendering/strategies/list.rb', line 4 def @options end |
Instance Method Details
#render ⇒ Object
8 9 10 |
# File 'lib/navigatrix/rendering/strategies/list.rb', line 8 def render content_tag(:ul, render_items, html_attributes) end |
#render_items ⇒ Object
12 13 14 |
# File 'lib/navigatrix/rendering/strategies/list.rb', line 12 def render_items items.map(&:render).join.html_safe end |