Class: GovukComponent::Header

Inherits:
Base
  • Object
show all
Includes:
ViewComponent::Slotable
Defined in:
app/components/govuk_component/header.rb

Defined Under Namespace

Classes: Item

Instance Attribute Summary collapse

Attributes included from Traits::CustomHtmlAttributes

#html_attributes

Instance Method Summary collapse

Methods inherited from Base

wrap_slot

Methods included from Traits::CustomClasses

#classes

Constructor Details

#initialize(logo: 'GOV.UK', logo_href: '/', service_name: nil, service_name_href: '/', classes: [], html_attributes: {}) ⇒ Header

Returns a new instance of Header.



9
10
11
12
13
14
15
16
# File 'app/components/govuk_component/header.rb', line 9

def initialize(logo: 'GOV.UK', logo_href: '/', service_name: nil, service_name_href: '/', classes: [], html_attributes: {})
  super(classes: classes, html_attributes: html_attributes)

  @logo              = 
  @logo_href         = logo_href
  @service_name      = service_name
  @service_name_href = service_name_href
end

Instance Attribute Details

#logoObject

Returns the value of attribute logo.



4
5
6
# File 'app/components/govuk_component/header.rb', line 4

def 
  @logo
end

#logo_hrefObject

Returns the value of attribute logo_href.



4
5
6
# File 'app/components/govuk_component/header.rb', line 4

def logo_href
  @logo_href
end

#service_nameObject

Returns the value of attribute service_name.



4
5
6
# File 'app/components/govuk_component/header.rb', line 4

def service_name
  @service_name
end

#service_name_hrefObject

Returns the value of attribute service_name_href.



4
5
6
# File 'app/components/govuk_component/header.rb', line 4

def service_name_href
  @service_name_href
end