carto/lib/mess/tree/attribute.js
2011-01-05 14:23:28 -05:00

26 lines
507 B
JavaScript

(function (tree) {
tree.Attribute = function (key, op, val) {
this.key = key;
this.op = op;
this.val = val;
};
/*
* tree.Attribute.prototype.match = function (other) {
if (this.elements[0].value === other.elements[0].value) {
return true;
} else {
return false;
}
};
*/
tree.Attribute.prototype.toCSS = function (env) {
return '<Filter>[' + this.key + '] ' +
this.op +
' ' +
this.val +
'</Filter>';
};
})(require('mess/tree'));