Method: Cucumber::MultilineArgument::DataTable#hashes

Defined in:
lib/cucumber/multiline_argument/data_table.rb

#hashesObject

Converts this table into an Array of Hash where the keys of each Hash are the headers in the table. For example, a Table built from the following plain text:

| a | b | sum |
| 2 | 3 | 5   |
| 7 | 9 | 16  |

Gets converted into the following:

[{'a' => '2', 'b' => '3', 'sum' => '5'}, {'a' => '7', 'b' => '9', 'sum' => '16'}]

Use #map_column to specify how values in a column are converted.



143
144
145
# File 'lib/cucumber/multiline_argument/data_table.rb', line 143

def hashes
  @hashes ||= build_hashes
end