Class: GovukComponent::StartNowButton

Inherits:
Base
  • Object
show all
Defined in:
app/components/govuk_component/start_now_button.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(text:, href:, classes: [], html_attributes: {}) ⇒ StartNowButton

Returns a new instance of StartNowButton.



4
5
6
7
8
9
# File 'app/components/govuk_component/start_now_button.rb', line 4

def initialize(text:, href:, classes: [], html_attributes: {})
  super(classes: classes, html_attributes: html_attributes)

  @text = text
  @href = href
end

Instance Attribute Details

#hrefObject

Returns the value of attribute href.



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

def href
  @href
end

#textObject

Returns the value of attribute text.



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

def text
  @text
end