Class: MojComponent::HeaderComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/moj_component/header_component.rb

Defined Under Namespace

Classes: NavigationItem

Instance Attribute Summary collapse

Instance Method Summary collapse

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

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_tabObject (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_nameObject (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

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'app/components/moj_component/header_component.rb', line 7

def url
  @url
end