lib/collection/property.js
function (scope, overrides, options) {
        var ignoreOwnVariables = options && options.ignoreOwnVariables,
            variableSourceObj,
            variables,
            reference;

        // ensure you do not substitute variables itself!
        reference = this.toJSON();
        _.isArray(reference.variable) && (delete reference.variable);

        // if `ignoreScopeVariables` is turned on, ignore `.variables` and resolve with only `overrides`
        // otherwise find `.variables` on current object or `scope`
        if (ignoreOwnVariables) {
            return Property.replaceSubstitutionsIn(reference, overrides);
        }

        // 1. if variables is passed as params, use it or fall back to oneself
        // 2. for a source from point (1), and look for `.variables`
        // 3. if `.variables` is not found, then rise up the parent to find first .variables
        variableSourceObj = scope || this;
        do {
            variables = variableSourceObj.variables;
            variableSourceObj = variableSourceObj.__parent;
        } while (!variables && variableSourceObj);

        if (!variables) { // worst case = no variable param and none detected in tree or object
            throw Error('Unable to resolve variables. Require a List type property for variable auto resolution.');
        }

        return variables.substitute(reference, overrides);
    }
function (scope, overrides, options) {
        var ignoreOwnVariables = options && options.ignoreOwnVariables,
            variableSourceObj,
            variables,
            reference;

        // ensure you do not substitute variables itself!
        reference = this.toJSON();
        _.isArray(reference.variable) && (delete reference.variable);

        // if `ignoreScopeVariables` is turned on, ignore `.variables` and resolve with only `overrides`
        // otherwise find `.variables` on current object or `scope`
        if (ignoreOwnVariables) {
            return Property.replaceSubstitutionsIn(reference, overrides);
        }

        // 1. if variables is passed as params, use it or fall back to oneself
        // 2. for a source from point (1), and look for `.variables`
        // 3. if `.variables` is not found, then rise up the parent to find first .variables
        variableSourceObj = scope || this;
        do {
            variables = variableSourceObj.variables;
            variableSourceObj = variableSourceObj.__parent;
        } while (!variables && variableSourceObj);

        if (!variables) { // worst case = no variable param and none detected in tree or object
            throw Error('Unable to resolve variables. Require a List type property for variable auto resolution.');
        }

        return variables.substitute(reference, overrides);
    }
function ( scope , overrides , options ) { var ignoreOwnVariables = options && options . ignoreOwnVariables , variableSourceObj , variables , reference ; // ensure you do not substitute variables itself! reference = this . toJSON ( ) ; _ . isArray ( reference . variable ) && ( delete reference . variable ) ; // if `ignoreScopeVariables` is turned on, ignore `.variables` and resolve with only `overrides` // otherwise find `.variables` on current object or `scope` if ( ignoreOwnVariables ) { return Property . replaceSubstitutionsIn ( reference , overrides ) ; } // 1. if variables is passed as params, use it or fall back to oneself // 2. for a source from point (1), and look for `.variables` // 3. if `.variables` is not found, then rise up the parent to find first .variables variableSourceObj = scope || this ; do { variables = variableSourceObj . variables ; variableSourceObj = variableSourceObj . __parent ; } while ( ! variables && variableSourceObj ) ; if ( ! variables ) { // worst case = no variable param and none detected in tree or object throw Error ( 'Unable to resolve variables. Require a List type property for variable auto resolution.' ) ; } return variables . substitute ( reference , overrides ) ; }
Returns an object representation of the Property with its variable references substituted.

@example <caption>Resolve an object using variable definitions from itself and its parents</caption>
property.toObjectResolved();

@example <caption>Resolve an object using variable definitions on a different object</caption>
property.toObjectResolved(item);

@example <caption>Resolve an object using variables definitions as a flat list of variables</caption>
property.toObjectResolved(null, [variablesDefinition1, variablesDefinition1], {ignoreOwnVariables: true});

@private
@draft
@param {?Item|ItemGroup=} [scope] - One can specifically provide an item or group with `.variables`. In
the event one is not provided, the variables are taken from this object or one from the parent tree.
@param {Array<Object>} overrides - additional objects to lookup for variable values
@param {Object} [options]
@param {Boolean} [options.ignoreOwnVariables] - if set to true, `.variables` on self(or scope)
will not be used for variable resolution. Only variables in `overrides` will be used for resolution.
@returns {Object|undefined}
@throws {Error} If `variables` cannot be resolved up the parent chain.
Returns an object representation of the Property with its variable references substituted .