Sha256: 13008a840efccdca05e04b6f7bd822d9c4bef056609dba7e41b351fd17647b52

Contents?: true

Size: 637 Bytes

Versions: 5

Compression:

Stored size: 637 Bytes

Contents

/*!
 * Jade - nodes - Text
 * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
 * MIT Licensed
 */

/**
 * Module dependencies.
 */

var Node = require('./node');

/**
 * Initialize a `Text` node with optional `line`.
 *
 * @param {String} line
 * @api public
 */

var Text = module.exports = function Text(line) {
  this.nodes = [];
  if ('string' == typeof line) this.push(line);
};

/**
 * Inherit from `Node`.
 */

Text.prototype.__proto__ = Node.prototype;

/**
 * Push the given `node.`
 *
 * @param {Node} node
 * @return {Number}
 * @api public
 */

Text.prototype.push = function(node){
  return this.nodes.push(node);
};

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stylus-source-0.27.1 vendor/node_modules/mocha/node_modules/jade/lib/nodes/text.js
stylus-source-0.27.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/text.js
stylus-source-0.26.1 vendor/node_modules/mocha/node_modules/jade/lib/nodes/text.js
stylus-source-0.26.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/text.js
stylus-source-0.25.0 vendor/node_modules/mocha/node_modules/jade/lib/nodes/text.js