hashugar
hashugar copied to clipboard
Nested OpenStruct alternative optimized for speed especially for many short-lived objects.
This will replace #14 and adds all methods from internal `Hash`. This PR is on top of and includes changes from #15
Hashes that include arrays of hashes, at least, do not round-trip to Hashugar and back cleanly. ```ruby Hashugar.new({foo: {bar: [{baz: 1},{baz: 2},{baz: 3}]}}).to_hash => {:foo=> {:bar=> [#1}, @table_with_original_keys={:baz=>1}>, #2}, @table_with_original_keys={:baz=>2}>,...
This change will add a bunch of [Enumerable methods](http://ruby-doc.org/core-2.5.0/Enumerable.html) such as `map`, `select`, `any?`, etc.
This change will unify `@table` and `@table_with_original_keys` into one `@table` to: * Keep original keys (string or symbol) * Mutate contents with original keys * Or if original key doesn't...