Be careful, though, with groups. If you create an empty group in the definition and then add geometry to it, you'll be okay. But if you try to create the group with specified geometry, your group will end up in the main model entities space. That's because in ruby, things that are impossible when drawing manually become (theoretically) possible, such as using FollowMe on a path outside the current entities space (will work), or creating groups inside of groups when you aren't inside the group to begin with (won't work). π
So, just be mindful when working with groups & nested geometry, that things may not happen the way you expect.