Class: DsfrComponent::HeaderComponent::DirectLinkComponent
- Inherits:
-
Base
- Object
- ViewComponent::Base
- Base
- DsfrComponent::HeaderComponent::DirectLinkComponent
- Defined in:
- app/components/dsfr_component/header_component/direct_link_component.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(title:, path:, active: false, classes: [], html_attributes: {}) ⇒ DirectLinkComponent
constructor
A new instance of DirectLinkComponent.
Constructor Details
#initialize(title:, path:, active: false, classes: [], html_attributes: {}) ⇒ DirectLinkComponent
Returns a new instance of DirectLinkComponent.
2 3 4 5 6 7 8 |
# File 'app/components/dsfr_component/header_component/direct_link_component.rb', line 2 def initialize(title:, path:, active: false, classes: [], html_attributes: {}) @title = title @path = path @active = active super(classes: classes, html_attributes: html_attributes) end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'app/components/dsfr_component/header_component/direct_link_component.rb', line 10 def call tag.a(title, **html_attributes) end |