Class: Web::Unit::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.
91 92 93 94 |
# File 'lib/web/unit/table.rb', line 91 def initialize( ah ) super( 'tr', ah ) @cols = [] end |
Instance Method Details
#add(col) ⇒ Object
105 106 107 |
# File 'lib/web/unit/table.rb', line 105 def add( col ) @cols << col end |
#at(c) ⇒ Object
— TableRow#at( c )
return TableCell, pointed by ((|c|)).
c is beginning from 1.
115 116 117 |
# File 'lib/web/unit/table.rb', line 115 def at( c ) @cols[c-1] end |
#size ⇒ Object
— TableRow#size
return column number.
101 102 103 |
# File 'lib/web/unit/table.rb', line 101 def size @cols.size end |