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