Class: DsfrComponent::HeaderComponent::ToolLinkComponent
- Inherits:
-
Base
- Object
- ViewComponent::Base
- Base
- DsfrComponent::HeaderComponent::ToolLinkComponent
- Defined in:
- app/components/dsfr_component/header_component/tool_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:, classes: [], html_attributes: {}) ⇒ ToolLinkComponent
constructor
A new instance of ToolLinkComponent.
Constructor Details
#initialize(title:, path:, classes: [], html_attributes: {}) ⇒ ToolLinkComponent
Returns a new instance of ToolLinkComponent.
2 3 4 5 6 7 |
# File 'app/components/dsfr_component/header_component/tool_link_component.rb', line 2 def initialize(title:, path:, classes: [], html_attributes: {}) @title = title @path = path super(classes: classes, html_attributes: html_attributes) end |
Instance Method Details
#call ⇒ Object
9 10 11 |
# File 'app/components/dsfr_component/header_component/tool_link_component.rb', line 9 def call tag.a title, href: path, **html_attributes end |