def violations
      validator.rules.each_with_object(Set.new) do |rule, violations|
        violations.merge(rule.violations(resource))
      end
    end
def violations
      validator.rules.each_with_object(Set.new) do |rule, violations|
        violations.merge(rule.violations(resource))
      end
    end
Return violations for resource

 @param [Resource] resource

 @api private