Class: WebUnit::TableCell

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

Direct Known Subclasses

NilTableCell

Instance Attribute Summary collapse

Attributes inherited from HtmlElem

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

Instance Method Summary collapse

Methods inherited from HtmlElem

#append, #extract, #find, #has?, #inspect, #print, #readlink, #search

Constructor Details

#initialize(tag, ah) ⇒ TableCell

Returns a new instance of TableCell.



126
127
128
129
130
131
132
# File 'lib/webunit/table.rb', line 126

def initialize( tag, ah )
  super
  @colspan = ah['colspan']
  @rowspan = ah['rowspan']
  @cs = @colspan.to_i || 1
  @rs = @rowspan.to_i || 1
end

Instance Attribute Details

#colspanObject (readonly)

Returns the value of attribute colspan.



122
123
124
# File 'lib/webunit/table.rb', line 122

def colspan
  @colspan
end

#csObject

Returns the value of attribute cs.



124
125
126
# File 'lib/webunit/table.rb', line 124

def cs
  @cs
end

#dataObject (readonly)

Returns the value of attribute data.



122
123
124
# File 'lib/webunit/table.rb', line 122

def data
  @data
end

#rowspanObject (readonly)

Returns the value of attribute rowspan.



122
123
124
# File 'lib/webunit/table.rb', line 122

def rowspan
  @rowspan
end

#rsObject

Returns the value of attribute rs.



124
125
126
# File 'lib/webunit/table.rb', line 124

def rs
  @rs
end