38
J'ai 2 hash, par exemple:Somme 2 hash attributs avec la même clé
{'a' => 30, 'b' => 14}
{'a' => 4, 'b' => 23, 'c' => 7}
où a
, b
et c
sont des objets. Comment puis-je résumer ces touches de hashes pour obtenir un nouveau hachage comme:
{'a' => 34, 'b' => 37, 'c' => 7}