Class: GovukComponent::Header
- Includes:
- ViewComponent::Slotable
- Defined in:
- app/components/govuk_component/header.rb
Defined Under Namespace
Classes: Item
Instance Attribute Summary collapse
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#logo_href ⇒ Object
Returns the value of attribute logo_href.
-
#service_name ⇒ Object
Returns the value of attribute service_name.
-
#service_name_href ⇒ Object
Returns the value of attribute service_name_href.
Attributes included from Traits::CustomHtmlAttributes
Instance Method Summary collapse
-
#initialize(logo: 'GOV.UK', logo_href: '/', service_name: nil, service_name_href: '/', classes: [], html_attributes: {}) ⇒ Header
constructor
A new instance of Header.
Methods inherited from Base
Methods included from Traits::CustomClasses
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 @logo_href = logo_href @service_name = service_name @service_name_href = service_name_href end |
Instance Attribute Details
#logo ⇒ Object
Returns the value of attribute logo.
4 5 6 |
# File 'app/components/govuk_component/header.rb', line 4 def logo @logo end |
#logo_href ⇒ Object
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_name ⇒ Object
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_href ⇒ Object
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 |