Class: Brainzlab::Components::NavItem
- Defined in:
- lib/brainzlab/components/nav_item.rb
Instance Method Summary collapse
-
#initialize(href: '#', active: false, **attrs) ⇒ NavItem
constructor
A new instance of NavItem.
- #view_template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(href: '#', active: false, **attrs) ⇒ NavItem
Returns a new instance of NavItem.
6 7 8 9 10 |
# File 'lib/brainzlab/components/nav_item.rb', line 6 def initialize(href: '#', active: false, **attrs) @href = href @active = active @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/brainzlab/components/nav_item.rb', line 12 def view_template(&) a( href: @href, class: nav_item_classes, **@attrs, & ) end |