Class: SdrViewComponents::Elements::NavLinkComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- SdrViewComponents::Elements::NavLinkComponent
- Defined in:
- app/components/sdr_view_components/elements/nav_link_component.rb
Overview
A single link in the header nav, bootstrap-style
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title:, path:, **options) ⇒ NavLinkComponent
constructor
A new instance of NavLinkComponent.
Constructor Details
#initialize(title:, path:, **options) ⇒ NavLinkComponent
Returns a new instance of NavLinkComponent.
7 8 9 10 11 12 |
# File 'app/components/sdr_view_components/elements/nav_link_component.rb', line 7 def initialize(title:, path:, **) @title = title @path = path @options = super() end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
14 15 16 |
# File 'app/components/sdr_view_components/elements/nav_link_component.rb', line 14 def @options end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
14 15 16 |
# File 'app/components/sdr_view_components/elements/nav_link_component.rb', line 14 def path @path end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
14 15 16 |
# File 'app/components/sdr_view_components/elements/nav_link_component.rb', line 14 def title @title end |