I've written a beginning Ruby tutorial. Since I'm very new to Ruby, its all still very fresh in my mind what I needed to learn to get started writing scripts for SketchUp. So I tried to put all into a simple tutorial. This includes pre-script writing info, like where to find the necessary info, what text editor to use, how to test code inside of SU, and then I write a script and explain what all the code does. This is all in about 10 pages. So its short and very direct (unlike this post). So check it out. See if it helps.
It shows how to write a code that iterates through all geometry in the model and make an array that holds all the edges, one for the faces, one for the components, and one for groups. So all you would need to do is to take one of those arrays (I'll use the faces array I made in the example below) and do something like:
entities.erase_entities faces
Hope that helps. Feel free to post over in the Ruby forum once you get into the coding and have direct questions about it. Hope that helps,
Chris