lib/watir/elements/table_cell.rb in watir-6.13.0 vs lib/watir/elements/table_cell.rb in watir-6.14.0
- old
+ new
@@ -1,8 +1,7 @@
module Watir
class TableCell < HTMLElement
-
def column_header
current_row = parent(tag_name: 'tr')
header_row(current_row, index: previous_siblings.size).text
end
@@ -15,16 +14,16 @@
end
private
def header_row(current_row, opt)
- table = self.parent(tag_name: 'table')
+ table = parent(tag_name: 'table')
header_row = table.tr
table.cell_size_check(header_row, current_row)
header_type = table.th.exist? ? 'th' : 'tr'
- opt.merge!(tag_name: header_type)
+ opt[:tag_name] = header_type
Watir.tag_to_class[header_type.to_sym].new(header_row, opt)
end
end # TableCell
end # Watir