Sha256: 659983d15c777f2ffb04522c4475462a126de04dddb77267fc75d8a442ddc132

Contents?: true

Size: 784 Bytes

Versions: 76

Compression:

Stored size: 784 Bytes

Contents

/*!
 * Stylus - Extend
 * Copyright(c) 2010 LearnBoost <dev@learnboost.com>
 * MIT Licensed
 */

/**
 * Module dependencies.
 */

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

/**
 * Initialize a new `Extend` with the given `selector`.
 *
 * @param {Selector} selector
 * @api public
 */

var Extend = module.exports = function Extend(selector){
  Node.call(this);
  this.selector = selector;
};

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

Extend.prototype.__proto__ = Node.prototype;

/**
 * Return a clone of this node.
 * 
 * @return {Node}
 * @api public
 */

Extend.prototype.clone = function(){
  return new Extend(this.selector);
};

/**
 * Return `@extend selector`.
 *
 * @return {String}
 * @api public
 */

Extend.prototype.toString = function(){
  return '@extend ' + this.selector;
};

Version data entries

76 entries across 62 versions & 2 rubygems

Version Path
stylus-source-0.32.0 vendor/lib/nodes/extend.js
stylus-source-0.31.0 vendor/lib/nodes/extend.js
stylus-source-0.30.1 vendor/lib/nodes/extend.js
stylus-source-0.30.0 vendor/lib/nodes/extend.js
stylus-source-0.29.0 vendor/lib/nodes/extend.js
stylus-source-0.28.2 vendor/lib/nodes/extend.js
stylus-source-0.28.1 vendor/lib/nodes/extend.js
stylus-source-0.28.0 vendor/lib/nodes/extend.js
stylus-source-0.27.2 vendor/lib/nodes/extend.js
stylus-source-0.27.1 vendor/lib/nodes/extend.js
stylus-source-0.27.0 vendor/lib/nodes/extend.js
stylus-source-0.26.1 vendor/lib/nodes/extend.js
stylus-source-0.26.0 vendor/lib/nodes/extend.js
stylus-source-0.25.0 vendor/lib/nodes/extend.js
stylus-source-0.24.0 vendor/lib/nodes/extend.js
stylus-source-0.23.0 vendor/lib/nodes/extend.js