Module: Taka::DOM::HTML::TableCellElement

Defined in:
lib/taka/dom/html/table_cell_element.rb

Instance Method Summary collapse

Instance Method Details

#cellIndexObject



5
6
7
8
9
10
11
12
13
# File 'lib/taka/dom/html/table_cell_element.rb', line 5

def cellIndex
  tr = parent
  while tr.node_name != 'tr'
    tr = tr.parent
  end
  tr.cells.each_with_index do |cell,i|
    return i if cell == self
  end
end

#chObject



15
16
17
# File 'lib/taka/dom/html/table_cell_element.rb', line 15

def ch
  self['char']
end

#chOffObject



19
20
21
# File 'lib/taka/dom/html/table_cell_element.rb', line 19

def chOff
  self['charoff']
end

#colSpanObject



23
24
25
# File 'lib/taka/dom/html/table_cell_element.rb', line 23

def colSpan
  self['colspan'] && self['colspan'].to_i
end

#rowSpanObject



27
28
29
# File 'lib/taka/dom/html/table_cell_element.rb', line 27

def rowSpan
  self['rowspan'] && self['rowspan'].to_i
end