Class: GovukComponent::PanelComponent
- Inherits:
-
Base
- Object
- Base
- GovukComponent::PanelComponent
- Defined in:
- app/components/govuk_component/panel_component.rb
Defined Under Namespace
Classes: Action
Instance Attribute Summary collapse
-
#heading_level ⇒ Object
readonly
Returns the value of attribute heading_level.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#interruption ⇒ Object
readonly
Returns the value of attribute interruption.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#title_text ⇒ Object
readonly
Returns the value of attribute title_text.
Instance Method Summary collapse
-
#initialize(title_text: nil, text: nil, interruption: false, heading_level: 1, id: nil, classes: [], html_attributes: {}) ⇒ PanelComponent
constructor
A new instance of PanelComponent.
Constructor Details
#initialize(title_text: nil, text: nil, interruption: false, heading_level: 1, id: nil, classes: [], html_attributes: {}) ⇒ PanelComponent
Returns a new instance of PanelComponent.
7 8 9 10 11 12 13 14 15 |
# File 'app/components/govuk_component/panel_component.rb', line 7 def initialize(title_text: nil, text: nil, interruption: false, heading_level: 1, id: nil, classes: [], html_attributes: {}) @heading_level = heading_level @title_text = title_text @text = text @id = id @interruption = interruption super(classes:, html_attributes:) end |
Instance Attribute Details
#heading_level ⇒ Object (readonly)
Returns the value of attribute heading_level.
2 3 4 |
# File 'app/components/govuk_component/panel_component.rb', line 2 def heading_level @heading_level end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'app/components/govuk_component/panel_component.rb', line 2 def id @id end |
#interruption ⇒ Object (readonly)
Returns the value of attribute interruption.
2 3 4 |
# File 'app/components/govuk_component/panel_component.rb', line 2 def interruption @interruption end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
2 3 4 |
# File 'app/components/govuk_component/panel_component.rb', line 2 def text @text end |
#title_text ⇒ Object (readonly)
Returns the value of attribute title_text.
2 3 4 |
# File 'app/components/govuk_component/panel_component.rb', line 2 def title_text @title_text end |