Method: Mechanize::Form::Option#initialize
- Defined in:
- lib/mechanize/form/option.rb
#initialize(node, select_list) ⇒ Option
Returns a new instance of Option.
17 18 19 20 21 22 23 |
# File 'lib/mechanize/form/option.rb', line 17 def initialize(node, select_list) @node = node @text = node.inner_text @value = Mechanize::Util.html_unescape(node['value'] || node.inner_text) @selected = node.has_attribute? 'selected' @select_list = select_list # The select list this option belongs to end |