wearemolecule/damage — pull request #6 by adamstrickland (2014-06-02 13:45:09+00:00)
Title: Tag Groups

Not sure if FIX 4.2 had tag groups, but FIX 4.4 does. Generally speaking, a tag group is characterized by a marker tag, indicating the number of groups; for instance, you might see 453=8, which indicates that there are 8 Party groups. Each group may repeat tags; in the case of a party group, each group has a PartyID (`448`) and a PartyRole (`452`). What had been happening prior to this PR is that the `Damage::Response#message_hash` method was clobbering values due to the repeated tags, leaving only a single PartyID and PartyRole value, that being the last of the groups. This PR simply allows for tags to have multiple values; when a tag is repeated the value of the hash becomes an array of items.

I'm thinking that this is prolly not the last time we'll need to touch this... There's no actual correlation between the values within a group, and strictly speaking there should be. IOW, there isn't an explicit link that **this** PartyID was part of the same group as **this** PartyRole. ATM, a simple index match is envisioned, (e.g. `message['PartyID'][message['PartyRole'].index{|pr| pr == 11}]`) but one can see many possible cases where that naïve implementation breaks down. However, to be done correctly, the schema must be queried much more extensively than is currently occurring, so for the time being, I decided to hold off until an expressed need was found.