UNPKG

jade

Version:

Jade template engine

51 lines (39 loc) 648 B
/*! * Stylus - Root * Copyright(c) 2010 LearnBoost <dev@learnboost.com> * MIT Licensed */ /** * Module dependencies. */ var Node = require('./node'); /** * Initialize a new `Root` node. * * @api public */ var Root = module.exports = function Root(){ this.nodes = []; }; /** * Inherit from `Node.prototype`. */ Root.prototype.__proto__ = Node.prototype; /** * Push a `node` to this block. * * @param {Node} node * @api public */ Root.prototype.push = function(node){ this.nodes.push(node); }; /** * Return "root". * * @return {String} * @api public */ Root.prototype.toString = function(){ return '[Root]'; };