Class: Web::Unit::TableCell

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



127
128
129
130
131
132
133
# File 'lib/web/unit/table.rb', line 127

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.



123
124
125
# File 'lib/web/unit/table.rb', line 123

def colspan
  @colspan
end

#csObject

Returns the value of attribute cs.



125
126
127
# File 'lib/web/unit/table.rb', line 125

def cs
  @cs
end

#dataObject (readonly)

Returns the value of attribute data.



123
124
125
# File 'lib/web/unit/table.rb', line 123

def data
  @data
end

#rowspanObject (readonly)

Returns the value of attribute rowspan.



123
124
125
# File 'lib/web/unit/table.rb', line 123

def rowspan
  @rowspan
end

#rsObject

Returns the value of attribute rs.



125
126
127
# File 'lib/web/unit/table.rb', line 125

def rs
  @rs
end