Sha256: 2a8f1b72fb046433d49772923348e27b8d55313c388134585b728cc07c19b4ef
Contents?: true
Size: 720 Bytes
Versions: 15
Compression:
Stored size: 720 Bytes
Contents
module WWW class Mechanize class Form # 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" class Field attr_accessor :name, :value def initialize(name, value) @name = Util.html_unescape(name) @value = if value.is_a? String Util.html_unescape(value) else value end end def query_value [[@name, @value || '']] end end end end end
Version data entries
15 entries across 15 versions & 5 rubygems