lib/watir-webdriver/row_container.rb in watir-webdriver-0.9.1 vs lib/watir-webdriver/row_container.rb in watir-webdriver-0.9.2

- old
+ new

@@ -4,25 +4,19 @@ # # Returns table row. # def row(*args) - row = tr(*args) - row.locator_class = ChildRowLocator - - row + Row.new(self, extract_selector(args).merge(tag_name: "tr")) end # # Returns table rows collection. # def rows(*args) - rows = trs(*args) - rows.locator_class = ChildRowLocator - - rows + RowCollection.new(self, extract_selector(args).merge(tag_name: "tr")) end # # The table as a 2D Array of strings with the text of each cell. # @@ -31,10 +25,10 @@ def strings assert_exists rows.inject [] do |res, row| - res << row.cells.map { |cell| cell.text } + res << row.cells.map(&:text) end end alias_method :to_a, :strings end # RowContainer