Class: WebUnit::TableRow
Instance Attribute Summary
Attributes inherited from HtmlElem
#array, #attrs, #children, #data, #name, #tag
Instance Method Summary collapse
- #add(col) ⇒ Object
-
#at(c) ⇒ Object
— TableRow#at( c ) return TableCell, pointed by ((|c|)).
-
#initialize(ah) ⇒ TableRow
constructor
A new instance of TableRow.
-
#size ⇒ Object
— TableRow#size return column number.
Methods inherited from HtmlElem
#append, #extract, #find, #has?, #inspect, #print, #readlink, #search
Constructor Details
#initialize(ah) ⇒ TableRow
Returns a new instance of TableRow.
90 91 92 93 |
# File 'lib/webunit/table.rb', line 90 def initialize( ah ) super( 'tr', ah ) @cols = [] end |
Instance Method Details
#add(col) ⇒ Object
104 105 106 |
# File 'lib/webunit/table.rb', line 104 def add( col ) @cols << col end |
#at(c) ⇒ Object
— TableRow#at( c )
return TableCell, pointed by ((|c|)).
c is beginning from 1.
114 115 116 |
# File 'lib/webunit/table.rb', line 114 def at( c ) @cols[c-1] end |
#size ⇒ Object
— TableRow#size
return column number.
100 101 102 |
# File 'lib/webunit/table.rb', line 100 def size @cols.size end |