Class | Mechanize::Form::RadioButton |
In: |
lib/mechanize/form/radio_button.rb
|
Parent: | Field |
This class represents a radio button found in a Form. To activate the RadioButton in the Form, set the checked method to true.
checked | [RW] |
# File lib/mechanize/form/radio_button.rb, line 8 8: def initialize node, form 9: @checked = !!node['checked'] 10: @form = form 11: super(node) 12: end
# File lib/mechanize/form/radio_button.rb, line 14 14: def check 15: uncheck_peers 16: @checked = true 17: end
# File lib/mechanize/form/radio_button.rb, line 23 23: def click 24: checked ? uncheck : check 25: end
# File lib/mechanize/form/radio_button.rb, line 27 27: def label 28: (id = self['id']) && @form.page.labels_hash[id] || nil 29: end