Sha256: 8426504e532a98fbacf9f68352ee06d4f6c44938109c6c4e45910c6b32b6b417
Contents?: true
Size: 802 Bytes
Versions: 5
Compression:
Stored size: 802 Bytes
Contents
var Node = require("./node"), contexts = require("../contexts"); var DetachedRuleset = function (ruleset, frames) { this.ruleset = ruleset; this.frames = frames; }; DetachedRuleset.prototype = new Node(); DetachedRuleset.prototype.type = "DetachedRuleset"; DetachedRuleset.prototype.evalFirst = true; DetachedRuleset.prototype.accept = function (visitor) { this.ruleset = visitor.visit(this.ruleset); }; DetachedRuleset.prototype.eval = function (context) { var frames = this.frames || context.frames.slice(0); return new DetachedRuleset(this.ruleset, frames); }; DetachedRuleset.prototype.callEval = function (context) { return this.ruleset.eval(this.frames ? new contexts.Eval(context, this.frames.concat(context.frames)) : context); }; module.exports = DetachedRuleset;
Version data entries
5 entries across 5 versions & 2 rubygems