Factor attribute checking code and add a new attributeName property to RuleBase

This is a pretty simple approach to standardizing on dealing with attributes, but I think it covers the necessary bases.