Class: GovukRSpecHelpers::GovukCheckbox
- Inherits:
-
Object
- Object
- GovukRSpecHelpers::GovukCheckbox
- Defined in:
- lib/check_govuk_checkbox.rb
Instance Attribute Summary collapse
-
#hint_text ⇒ Object
readonly
Returns the value of attribute hint_text.
-
#label_text ⇒ Object
readonly
Returns the value of attribute label_text.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(page:, label_text:, hint_text:) ⇒ GovukCheckbox
constructor
A new instance of GovukCheckbox.
- #uncheck ⇒ Object
Constructor Details
#initialize(page:, label_text:, hint_text:) ⇒ GovukCheckbox
Returns a new instance of GovukCheckbox.
6 7 8 9 10 |
# File 'lib/check_govuk_checkbox.rb', line 6 def initialize(page:, label_text:, hint_text:) @label_text = label_text @hint_text = hint_text @page = page end |
Instance Attribute Details
#hint_text ⇒ Object (readonly)
Returns the value of attribute hint_text.
4 5 6 |
# File 'lib/check_govuk_checkbox.rb', line 4 def hint_text @hint_text end |
#label_text ⇒ Object (readonly)
Returns the value of attribute label_text.
4 5 6 |
# File 'lib/check_govuk_checkbox.rb', line 4 def label_text @label_text end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
4 5 6 |
# File 'lib/check_govuk_checkbox.rb', line 4 def page @page end |
Instance Method Details
#check ⇒ Object
12 13 14 |
# File 'lib/check_govuk_checkbox.rb', line 12 def check set_checked(true) end |
#uncheck ⇒ Object
16 17 18 |
# File 'lib/check_govuk_checkbox.rb', line 16 def uncheck set_checked(false) end |