Class: WebUnit::TableRow

Inherits:
HtmlElem show all
Defined in:
lib/webunit/table.rb

Instance Attribute Summary

Attributes inherited from HtmlElem

#array, #attrs, #children, #data, #name, #tag

Instance Method Summary collapse

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

#sizeObject

— TableRow#size

return column number.


100
101
102
# File 'lib/webunit/table.rb', line 100

def size
  @cols.size
end