Class: GovukComponent::PhaseBanner

Inherits:
Base
  • Object
show all
Defined in:
app/components/govuk_component/phase_banner.rb

Instance Attribute Summary collapse

Attributes included from Traits::CustomHtmlAttributes

#html_attributes

Instance Method Summary collapse

Methods inherited from Base

wrap_slot

Methods included from Traits::CustomClasses

#classes

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

#phaseObject

Returns the value of attribute phase.



2
3
4
# File 'app/components/govuk_component/phase_banner.rb', line 2

def phase
  @phase
end

#textObject

Returns the value of attribute text.



2
3
4
# File 'app/components/govuk_component/phase_banner.rb', line 2

def text
  @text
end