Class: SdrViewComponents::Elements::NavLinkComponent

Inherits:
ViewComponent::Base
  • Object
show all
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

Instance Method Summary collapse

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:, **options)
  @title = title
  @path = path
  @options = options
  super()
end

Instance Attribute Details

#optionsObject (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
  @options
end

#pathObject (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

#titleObject (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