Class: Capybara::PomPom::Table
- Inherits:
-
Object
- Object
- Capybara::PomPom::Table
- Defined in:
- lib/capybara/pompom/table.rb
Instance Attribute Summary collapse
-
#row_wrapper ⇒ Object
readonly
Returns the value of attribute row_wrapper.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #get_row(index) ⇒ Object
-
#initialize(table, row_wrapper = nil) ⇒ Table
constructor
A new instance of Table.
Constructor Details
Instance Attribute Details
#row_wrapper ⇒ Object (readonly)
Returns the value of attribute row_wrapper.
5 6 7 |
# File 'lib/capybara/pompom/table.rb', line 5 def row_wrapper @row_wrapper end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
5 6 7 |
# File 'lib/capybara/pompom/table.rb', line 5 def table @table end |
Instance Method Details
#get_row(index) ⇒ Object
12 13 14 15 16 17 |
# 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 |