i'm not sure if the anchor pattern has to be applied for resources contained in a class. if i understand the documentation correctly it's only necessary if classes contain other classes.

according to http://docs.puppetlabs.com/puppet/latest/reference/lang_containment.html:

Resources of both native and defined resource types are automatically contained by the class or defined type in which they are declared.

BUT

However, unlike resources, Puppet does not automatically contain classes when they are declared inside another class