/* call-seq: * player.groups -> Array * * This method returns a list of groups where the player is in */ static VALUE playerRecord_getGroups(VALUE self) { bz_PlayerRecord *playerRecord; Data_Get_Struct(self, bz_PlayerRecord, playerRecord); VALUE groups = rb_ary_new(); for (int i = 0; i < playerRecord->groups.size(); i++) rb_ary_push(groups, rb_str_new2(playerRecord->groups[i].c_str())); return groups; }