def create_rule_enforcers(self, trigger_instance, matching_rules):
        """
        Creates a RuleEnforcer matching to each rule.

        This method is trigger_instance specific therefore if creation of 1 RuleEnforcer
        fails it is likely that all wil be broken.
        """
        metrics_driver = get_driver()

        enforcers = []
        for matching_rule in matching_rules:
            metrics_driver.inc_counter("rule.matched")
            metrics_driver.inc_counter("rule.%s.matched" % (matching_rule.ref))

            enforcers.append(RuleEnforcer(trigger_instance, matching_rule))
        return enforcers

        Creates a RuleEnforcer matching to each rule.

        This method is trigger_instance specific therefore if creation of 1 RuleEnforcer
        fails it is likely that all wil be broken.
        
st2reactor/st2reactor/rules/engine.py