blob: a83ffecc7df2bf08da2490930ce8e2f3c2811a3f [file] [log] [blame]
// Generated by CoffeeScript 1.6.3
(function() {
var XMLAttribute, _;
_ = require('lodash-node');
module.exports = XMLAttribute = (function() {
function XMLAttribute(parent, name, value) {
this.stringify = parent.stringify;
if (name == null) {
throw new Error("Missing attribute name");
}
if (value == null) {
throw new Error("Missing attribute value");
}
this.name = this.stringify.attName(name);
this.value = this.stringify.attValue(value);
}
XMLAttribute.prototype.clone = function() {
return _.create(XMLAttribute.prototype, this);
};
XMLAttribute.prototype.toString = function(options, level) {
return ' ' + this.name + '="' + this.value + '"';
};
return XMLAttribute;
})();
}).call(this);