Class: MojComponent::HeaderComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- MojComponent::HeaderComponent
- Defined in:
- app/components/moj_component/header_component.rb
Defined Under Namespace
Classes: NavigationItem
Instance Attribute Summary collapse
-
#nav_items ⇒ Object
readonly
Returns the value of attribute nav_items.
-
#new_tab ⇒ Object
readonly
Returns the value of attribute new_tab.
-
#organisation_name ⇒ Object
readonly
Returns the value of attribute organisation_name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(organisation_name:, url:, new_tab: false) ⇒ HeaderComponent
constructor
A new instance of HeaderComponent.
Constructor Details
#initialize(organisation_name:, url:, new_tab: false) ⇒ HeaderComponent
Returns a new instance of HeaderComponent.
12 13 14 15 16 17 |
# File 'app/components/moj_component/header_component.rb', line 12 def initialize(organisation_name:, url:, new_tab: false) @organisation_name = organisation_name @url = url @new_tab = new_tab super() end |
Instance Attribute Details
#nav_items ⇒ Object (readonly)
Returns the value of attribute nav_items.
7 8 9 |
# File 'app/components/moj_component/header_component.rb', line 7 def nav_items @nav_items end |
#new_tab ⇒ Object (readonly)
Returns the value of attribute new_tab.
7 8 9 |
# File 'app/components/moj_component/header_component.rb', line 7 def new_tab @new_tab end |
#organisation_name ⇒ Object (readonly)
Returns the value of attribute organisation_name.
7 8 9 |
# File 'app/components/moj_component/header_component.rb', line 7 def organisation_name @organisation_name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'app/components/moj_component/header_component.rb', line 7 def url @url end |