class Capybara::PomPom::Table

Attributes

row_wrapper[R]
table[R]

Public Class Methods

new(table, row_wrapper = nil) click to toggle source
# File lib/capybara/pompom/table.rb, line 7
def initialize(table, row_wrapper = nil)
  @table = table
  @row_wrapper = row_wrapper || TableRow
end

Public Instance Methods

get_row(index) click to toggle source
# File lib/capybara/pompom/table.rb, line 12
def get_row(index)
  row = table.find("tbody tr:nth-child(#{index})")
  row_wrapper.new(row)
rescue Capybara::ElementNotFound => e
  raise TableRowNotFound.new(e)
end