Class: ViewMatchers::Table
- Inherits:
-
Object
- Object
- ViewMatchers::Table
- Defined in:
- lib/view_matchers/table_matcher/table.rb
Direct Known Subclasses
Instance Method Summary collapse
- #contains?(table) ⇒ Boolean
-
#initialize(table) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(table) ⇒ Table
Returns a new instance of Table.
3 4 5 6 |
# File 'lib/view_matchers/table_matcher/table.rb', line 3 def initialize(table) @table = table self end |
Instance Method Details
#contains?(table) ⇒ Boolean
8 9 10 11 12 13 14 |
# File 'lib/view_matchers/table_matcher/table.rb', line 8 def contains?(table) possible_origins_of(table).each do |origin| matches = continuous_row_matches_from_index table, origin return true if matches.all? && matches.uniq.length == 1 end false end |