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