Class: Web::Unit::TableRow

Inherits:
HtmlElem show all
Defined in:
lib/web/unit/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.



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

#sizeObject

— TableRow#size

return column number.


101
102
103
# File 'lib/web/unit/table.rb', line 101

def size
  @cols.size
end