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