How to get the row size of the html's table?

in vb, we can use webbrowaer to get tables row.
for example,

webbrowser1.document.getElementsByTagName(“table”)(0).rows.length

then we can get the row size of html’table 1

if i have a html file(/home/name/test.html) , there are many tables in
it , how can i use ruby to get the row size of html’table 1,such as
webbrowser1.document.getElementsByTagName(“table”)(0).rows.length (vb)

Hi,

I think this might be useful
http://soledadpenades.com/2007/06/15/extracting-data-with-hpricot/