G
gga
I would like to have an object (think 2 hashes one inside the other)
that would get created from reading in two YAML descriptions and
merging them together.
I'm looking that given something like:
---
A:
v: valueA
---
B:
v: valueB
x: value
=====
C = A + B should result in:
C:
v: valueA # B's v: valueB discarded, overridden by valueA
x: value # B's x: value not discarded
Before I write my own stuff to do that sort of operation on a hash, I
was wondering if there were already some libs written to do something
similar or, put in another way, what would be the best ruby way of
doing so?
that would get created from reading in two YAML descriptions and
merging them together.
I'm looking that given something like:
---
A:
v: valueA
---
B:
v: valueB
x: value
=====
C = A + B should result in:
C:
v: valueA # B's v: valueB discarded, overridden by valueA
x: value # B's x: value not discarded
Before I write my own stuff to do that sort of operation on a hash, I
was wondering if there were already some libs written to do something
similar or, put in another way, what would be the best ruby way of
doing so?