How can I get Max Lenght of a Text Field

Blah = $ie.text_field(:name,$developer_name).MaxLenght()
puts Blah

Thanks,

···

--
Posted via http://www.ruby-forum.com/.

Darin Duphorn wrote:

Blah = $ie.text_field(:name,$developer_name).MaxLenght()
puts Blah

Thanks,

You so close.

First spell Length correctly ("Lenght")
Next it should be maxLenght() instead of MaxLenght

Hope that help, dummy.

···

--
Posted via http://www.ruby-forum.com/.

Try this:

a = %w(cat mule tiger vulture)
puts a.max {|a, b| a.length <=> b.length}

=> vulture

···

--
Posted via http://www.ruby-forum.com/.