rulesets method

List<Node> rulesets ()

Returns a List of MixinDefinition or Ruleset contained in this.rules

Implementation

List<Node> rulesets() {
  if (rules == null) return <Node>[];

  return rules.fold(<Node>[], (List<Node> filtRules, Node rule) {
    if (rule.isRuleset) filtRules.add(rule);
    return filtRules;
  });

//3.0.0 20160716
// Ruleset.prototype.rulesets = function () {
//     if (!this.rules) { return []; }
//
//     var filtRules = [], rules = this.rules,
//         i, rule;
//
//     for (i = 0; (rule = rules[i]); i++) {
//         if (rule.isRuleset) {
//             filtRules.push(rule);
//         }
//     }
//
//     return filtRules;
// };
}