lib/cuke_modeler/models/table.rb in cuke_modeler-3.19.0 vs lib/cuke_modeler/models/table.rb in cuke_modeler-3.20.0

- old
+ new

@@ -34,9 +34,20 @@ # this will be Gherkin text that is equivalent to the table being modeled. def to_s rows.empty? ? '' : rows.collect { |row| row_output_string(row) }.join("\n") end + # See `Object#inspect`. Returns some basic information about the + # object, including its class, object ID, and its most meaningful + # attribute. For a table model, this will be the rows of the table. + def inspect(verbose: false) + return super(verbose: verbose) if verbose + + row_output = @rows&.collect { |row| row.cells.collect(&:value) } + + "#{super.chop} @rows: #{row_output.inspect}>" + end + private def parse_source(source_text)