| Class | WWW::Mechanize::Field |
| In: |
lib/mechanize/form_elements.rb
|
| Parent: | Object |
This class represents a field in a form. It handles the following input tags found in a form: text, password, hidden, int, textarea
To set the value of a field, just use the value method: field.value = "foo"
| name | [RW] | |
| value | [RW] |
# File lib/mechanize/form_elements.rb, line 12
12: def initialize(name, value)
13: @name = Util.html_unescape(name)
14: @value = if value.is_a? String
15: Util.html_unescape(value)
16: else
17: value
18: end
19: end