Class: GovukComponent::CookieBanner
- Defined in:
- app/components/govuk_component/cookie_banner.rb
Instance Attribute Summary collapse
-
#aria_label ⇒ Object
Returns the value of attribute aria_label.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes included from Traits::CustomHtmlAttributes
Instance Method Summary collapse
-
#initialize(title: nil, aria_label: "Cookie banner", classes: [], html_attributes: {}) ⇒ CookieBanner
constructor
A new instance of CookieBanner.
Methods inherited from Base
Methods included from Traits::CustomClasses
Constructor Details
#initialize(title: nil, aria_label: "Cookie banner", classes: [], html_attributes: {}) ⇒ CookieBanner
Returns a new instance of CookieBanner.
6 7 8 9 10 11 |
# File 'app/components/govuk_component/cookie_banner.rb', line 6 def initialize(title: nil, aria_label: "Cookie banner", classes: [], html_attributes: {}) super(classes: classes, html_attributes: html_attributes) @title = title @aria_label = aria_label end |
Instance Attribute Details
#aria_label ⇒ Object
Returns the value of attribute aria_label.
4 5 6 |
# File 'app/components/govuk_component/cookie_banner.rb', line 4 def aria_label @aria_label end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'app/components/govuk_component/cookie_banner.rb', line 4 def title @title end |