The problem with 'hostgroup' is that there's also a 'hostgroup' association on the object, but I could use 'the_hostgroup' -- puppetclass is fine. In general, I find that in short iterations like this, abbreviated iterator variables are a common ruby practice, but it's easy enough to change it here if it makes things clearer.