Podfile.prototype.addSpec = function()

in lib/Podfile.js [179:198]


Podfile.prototype.addSpec = function (name, spec) {
    name = name || '';

    if (!name.length) { // blank names are not allowed
        throw new CordovaError('Podfile addSpec: name is not specified.');
    }

    if (typeof spec === 'string') {
        if (spec.startsWith(':')) {
            spec = { name, options: spec };
        } else {
            spec = { name, spec };
        }
    }

    this.pods[name] = spec;
    this.__dirty = true;

    events.emit('verbose', util.format('Added pod line for `%s`', name));
};