Create interface for Spreadsheet / Table
jeremybmerrill opened this issue · comments
spreadsheet algorithm outputs Spreadsheet objects, the original algorithm outputs Table objects.
We should write an "interface" (i.e. a Ruby module with shared methods, or just a definition of the methods that ought to be defined on both objects) to simplify the API, providing comparison methods, rows
, cols
, etc. whose output is identical for both.
Do y'all (including my future self) think that an each_cell and map_cells method would be useful on the common interface? That way, if you wanted to, for instance, strip non-alphanum chars or something, you could do that without having to mess around with table.rows.cells
and worrying about in-place stuff?
Closed in #71