Skip to content

Commit d922aeb

Browse files
committed
Rename: rule => option
1 parent fa525ae commit d922aeb

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lib/csscomb.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var vfs = require('vow-fs');
99
* @name Comb
1010
*/
1111
var Comb = function() {
12-
this._rules = {
12+
this._options = {
1313
'colon-space': {},
1414
'rule-indent': {},
1515
'sort-order': {},
@@ -24,18 +24,18 @@ Comb.prototype = {
2424

2525
/**
2626
* Loads configuration from JSON.
27-
* Activates and configures required rules.
27+
* Activates and configures required options.
2828
*
2929
* @param {Object} config
3030
*/
3131
configure: function(config) {
32-
for (var rule in config) {
33-
if (config.hasOwnProperty(rule) && config[rule] && this._rules[rule]) {
34-
var beautifier;
32+
for (var option in config) {
33+
if (config.hasOwnProperty(option) && config[option] && this._options[option]) {
34+
var handler;
3535
try {
36-
beautifier = require('./rules/' + rule);
37-
beautifier.value = config[rule];
38-
this._config[rule] = beautifier;
36+
handler = require('./options/' + option);
37+
handler.value = config[option];
38+
this._config[option] = handler;
3939
} catch (e) {}
4040
}
4141
}
@@ -65,9 +65,9 @@ Comb.prototype = {
6565
node.forEach(function(node) {
6666
if (!Array.isArray(node)) return;
6767
var nodeType = node.shift();
68-
for (var rule in config) {
69-
if (config.hasOwnProperty(rule)) {
70-
config[rule].process(nodeType, node);
68+
for (var option in config) {
69+
if (config.hasOwnProperty(option)) {
70+
config[option].process(nodeType, node);
7171
}
7272
}
7373
node.unshift(nodeType);

0 commit comments

Comments
 (0)