Modify the rules of output directories.

@param  {Array} rules The rules.
344257
function modifyOutRules(rules) {
	for (let i = 0; i < rules.length; ++i) {
		if (rules[i].test) {
			switch ('' + rules[i].test) {
				// Images
				case '/\\.(png|jpe?g|gif)$/':
					modifyOutRule(rules[i], 'images');
					break;
				// Fonts
				case '/\\.(woff2?|ttf|eot|svg|otf)$/':
					modifyOutRule(rules[i], 'fonts');
					break;
				default:

			}
		}
	}
}
1001685
function(rules) {
      return _.some(rules, function(rule) {
        return _.some(rule.resources, function(resource) {
          return checkResource(resource) && !_.isEmpty(_.intersection(rule.verbs ,(["*", "create", "update"])));
        });
      });
    }
1164727
public function setAllowedMaxFileSize($rules)
    {
        if (is_array($rules) && count($rules)) {
            // make sure all extensions are lowercase
            $rules = array_change_key_case($rules, CASE_LOWER);
            $finalRules = array();

            foreach ($rules as $rule => $value) {
                if (is_numeric($value)) {
                    $tmpSize = $value;
                } else {
                    $tmpSize = File::ini2bytes($value);
                }

                $finalRules[$rule] = (int)$tmpSize;
            }

            $this->allowedMaxFileSize = $finalRules;
        } elseif (is_string($rules)) {
            $this->allowedMaxFileSize['*'] = File::ini2bytes($rules);
        } elseif ((int)$rules > 0) {
            $this->allowedMaxFileSize['*'] = (int)$rules;
        }
    }
1211864
protected function addRuleLine($directories, $rule)
    {
        foreach ((array) $directories as $directory) {
            $this->addRule($rule, $directory);
        }

        return $this;
    }
490939
function Rules (options) {
  this.options = options;
  this._keep = [];
  this._remove = [];

  this.blankRule = {
    replacement: options.blankReplacement
  };

  this.keepReplacement = options.keepReplacement;

  this.defaultRule = {
    replacement: options.defaultReplacement
  };

  this.array = [];
  for (var key in options.rules) this.array.push(options.rules[key]);
}
864514
function argsByRules(argsArray, rules) {
  var params = rules || ['x', 'y', 'width', 'height'],
    args = {};

  for (var i = 0; i < argsArray.length; i++) {
    if (typeof(argsArray[i]) === "object")
      args["style"] = argsArray[i];
    else
    if (params.length)
      args[params.shift()] = argsArray[i];
  }

  args.style = normalizeStyle(args.style);

  if ((typeof(args.x) === 'string') && (typeof(args.y) === 'string'))
    args = smartCoordinates(args);

  return args;
}
496371
function modifyOutRule(rule, type) {
	rule.test = new RegExp(
		'\\.(' + Config.out[type].extensions.join('|') + ')$'
	);
}
186845
function applyReplacementRules(rulesset, content) {
  return rulesset.reduce((a,b) => {
    return a.replace(b[0], b[1]);
  }, content);
}
222231
function (rules, options) {
    this.rules = new Config(rules, options);
    this.parser = new Parser();
    this.inlineConfig = new InlineConfig(this.rules);
}
371627
public void setRules(java.util.Collection<RuleSummary> rules) {
        if (rules == null) {
            this.rules = null;
            return;
        }

        this.rules = new java.util.ArrayList<RuleSummary>(rules);
    }
368192
private void unpackRules(byte[] rules)
    {
        startDay       = rules[0];
        startDayOfWeek = rules[1];
        endDay         = rules[2];
        endDayOfWeek   = rules[3];

        // As of serial version 2, include time modes
        if (rules.length >= 6) {
            startTimeMode = rules[4];
            endTimeMode   = rules[5];
        }
    }
615276
private function setRuleset(array $rules = [])
    {
        // Passed rules rule, but we will use model rules if nothing has been passed
        $this->rules = $this->ruleset = $this->selectRules($rules);

        // Expand out rules
        foreach ($this->rules as $field => &$rule)
        {
            // Change pipe delimited rules to arrays
            $set = $this->pipeToArray($rule);
            $rule = $this->processRuleset($field, $set);
        }
    }
237554
public void setRules(List rules) {
        Assert.notNull(rules);
        if (logger.isDebugEnabled()) {
            logger.debug("Configuring rules in source...");
        }
        getRuleContext(DEFAULT_CONTEXT_ID).clear();
        for (Iterator i = rules.iterator(); i.hasNext();) {
            addRules((Rules) i.next());
        }
    }
93973
function applyDisallowedRuleToArray( itemsRule, items ) {
		if ( !itemsRule )
			return false;

		var hadInvalid = false,
			allDisallowed = itemsRule === true;

		for ( var i = items.length; i--; ) {
			if ( allDisallowed || itemsRule( items[ i ] ) ) {
				items.splice( i, 1 );
				hadInvalid = true;
			}
		}

		return hadInvalid;
	}
228721
function (rule) {
    var msg = this.messages.render(rule);
    this.errors.add(rule.attribute, msg);
    this.errorCount++;
  }
67008
public void setRules(java.lang.String rules) {
        getStateHelper().put(PropertyKeys.rules, rules);
        handleAttribute("rules", rules);
    }
999967
function (rules) {

    var parsedRules = {};
    rules = this._flattenObject(rules);

    for (var attribute in rules) {

      var rulesArray = rules[attribute];

      this._parseRulesCheck(attribute, rulesArray, parsedRules);
    }
    return parsedRules;


  }