class WWW::Mechanize::Form::Option
select_list.first.tick
select the first option in a list:
can be selected by calling Option#tick, or Option#click. For example,
SelectList can have many Option classes associated with it. An option
This class contains option an option found within SelectList. A
def click
def click unselect_peers @selected = !@selected end
def initialize(node, select_list)
def initialize(node, select_list) @text = node.inner_text @value = Mechanize.html_unescape(node['value']) @selected = node.has_attribute? 'selected' @select_list = select_list # The select list this option belongs to end
def select
def select unselect_peers @selected = true end
def unselect
def unselect @selected = false end
def unselect_peers
def unselect_peers if @select_list.instance_of? SelectList @select_list.select_none end end