diff options
| author | Teddy Wing | 2017-06-12 15:25:58 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-12 15:25:58 +0200 |
| commit | 6fb1431b3a2d3649bbd56ebc527fb45803248c94 (patch) | |
| tree | 4b4b71444641be7635f5e4ecf7836f90c8e9c772 /script | |
| parent | e89aead78b6182a0789d53e46b230df54aee82f3 (diff) | |
| download | chouette-core-6fb1431b3a2d3649bbd56ebc527fb45803248c94.tar.bz2 | |
TableBuilder: Make a new type for columns
Instead of making the columns a hash where the types get all confused
and mussed and we have to type check wherever we use the column value,
make the columns into their own real type.
Adds a new `Column` class to the helper module which lets us interact
with table column data in a much more natural way. Here, when mapping
over the column list, instead of getting a key and value which could be
whatever, we get a real `Column` object that we can call methods on to
get the appropriate data.
It's still not perfect, as evidenced by the `#tbody` method, which has
remained largely the same, but at least we're not checking
`attribute.is_a?(Hash)` like I had tried before.
Update the tests to use the new `TableBuilderHelper::Column` syntax for
defining columns.
Refs #3479
Diffstat (limited to 'script')
0 files changed, 0 insertions, 0 deletions
