I have an array of hashes, some of which are subsets of others.
a = []
a << {Bob: 1, Mary: 2, Sue: 3}
a << {Bob:1}
a << {Phil: 2, Brian: 8}
a << {Bob: 1, Mary: 2, Sue: 3, Tony: 9}
I need to return an array of the unique super-sets which, in this case, would be:
{Bob: 1, Mary: 2, Sue: 3, Tony: 9}
{Phil: 2, Brian: 8}
I read "Ruby Array Comparison Tricks" however it doesn't offer what I require.
Is there a Ruby solution to compare arrays and identify sub-arrays?