Sha256: f4be1b1cb364d4e7f587ec349469d4dfb058f4086bdeca268bc62e93590a728a

Contents?: true

Size: 1.5 KB

Versions: 35

Compression:

Stored size: 1.5 KB

Contents

// Generated by CoffeeScript 1.9.1
(function() {
  var XMLProcessingInstruction, create;

  create = require('lodash/create');

  module.exports = XMLProcessingInstruction = (function() {
    function XMLProcessingInstruction(parent, target, value) {
      this.stringify = parent.stringify;
      if (target == null) {
        throw new Error("Missing instruction target");
      }
      this.target = this.stringify.insTarget(target);
      if (value) {
        this.value = this.stringify.insValue(value);
      }
    }

    XMLProcessingInstruction.prototype.clone = function() {
      return create(XMLProcessingInstruction.prototype, this);
    };

    XMLProcessingInstruction.prototype.toString = function(options, level) {
      var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
      pretty = (options != null ? options.pretty : void 0) || false;
      indent = (ref = options != null ? options.indent : void 0) != null ? ref : '  ';
      offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;
      newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n';
      level || (level = 0);
      space = new Array(level + offset + 1).join(indent);
      r = '';
      if (pretty) {
        r += space;
      }
      r += '<?';
      r += this.target;
      if (this.value) {
        r += ' ' + this.value;
      }
      r += '?>';
      if (pretty) {
        r += newline;
      }
      return r;
    };

    return XMLProcessingInstruction;

  })();

}).call(this);

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
sumomo-0.10.8 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.10.4 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.10.3 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.10.2 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.10.1 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.10.0 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.9.0 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.22 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.21 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.20 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.17 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.16 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.15 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.14 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.13 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.12 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.11 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.10 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.9 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
sumomo-0.8.8 data/sumomo/api_modules/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js