Sha256: ffbc3d905862f8c88428f7ca19bad7aefbfb07ca0c12bcacb7a90b80d0c87bfc

Contents?: true

Size: 898 Bytes

Versions: 16

Compression:

Stored size: 898 Bytes

Contents

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

/**
 * Module dependencies.
 */

var BinOp = require('./binop');

/**
 * Initialize a new `Member` with `left` and `right`.
 *
 * @param {Node} left
 * @param {Node} right
 * @api public
 */

var Member = module.exports = function Member(left, right){
  BinOp.call(this, '.', left, right);
};

/**
 * Inherit from `BinOp.prototype`.
 */

Member.prototype.__proto__ = BinOp.prototype;

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

Member.prototype.clone = function(){
  var clone = BinOp.prototype.clone.call(this);
  clone.constructor = Member;
  return clone;
};

/**
 * Return a string representation of this node.
 *
 * @return {String}
 * @api public
 */

Member.prototype.toString = function(){
  return this.left.toString()
    + '.' + this.right.toString();
};

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
stylus-source-0.42.2 vendor/lib/nodes/member.js
stylus-source-0.42.1 vendor/lib/nodes/member.js
stylus-source-0.42.0 vendor/lib/nodes/member.js
stylus-source-0.41.3 vendor/lib/nodes/member.js
stylus-source-0.41.2 vendor/lib/nodes/member.js
stylus-source-0.41.1 vendor/lib/nodes/member.js
stylus-source-0.41.0 vendor/lib/nodes/member.js
stylus-source-0.40.3 vendor/lib/nodes/member.js
stylus-source-0.40.2 vendor/lib/nodes/member.js
stylus-source-0.40.1 vendor/lib/nodes/member.js
stylus-source-0.40.0 vendor/lib/nodes/member.js
stylus-source-0.39.4 vendor/lib/nodes/member.js
stylus-source-0.39.3 vendor/lib/nodes/member.js
stylus-source-0.39.2 vendor/lib/nodes/member.js
stylus-source-0.39.1 vendor/lib/nodes/member.js
stylus-source-0.39.0 vendor/lib/nodes/member.js