README.md in tablesmith-0.5.0 vs README.md in tablesmith-0.6.0
- old
+ new
@@ -37,16 +37,28 @@
| a | b |
+---+---+
| 1 | 2 |
+---+---+
-> [{date: '1/1/2020', amt: 35}, {date: '1/2/2020', amt: 80}].to_table
+> t = [{date: '1/1/2020', amt: 35}, {date: '1/2/2020', amt: 80}].to_table
=> +----------+-----+
| date | amt |
+----------+-----+
| 1/1/2020 | 35 |
| 1/2/2020 | 80 |
+----------+-----+
+
+> # Table delegates to Array, all Array methods are available.
+> t.select! { |h| h[:amt] > 40 }
+=> [{:date=>"1/2/2020", :amt=>80}]
+
+> t
+=> +----------+-----+
+| date | amt |
++----------+-----+
+| 1/2/2020 | 80 |
++----------+-----+
+
> p1 = Person.create(first_name: 'chrismo', custom_attributes: { instrument: 'piano', style: 'jazz' })
=> #<Person:0x00007fac3eb406a8 id: 1, first_name: "chrismo", last_name: nil, age: nil, custom_attributes: {:instrument=>"piano", :style=>"jazz"}>
> p2 = Person.create(first_name: 'romer', custom_attributes: { hobby: 'games' })
=> #<Person:0x00007fac3ebcbb68 id: 2, first_name: "romer", last_name: nil, age: nil, custom_attributes: {:hobby=>"games"}>